From 9df15023aff80ef9935840168c2b85623099a3c2 Mon Sep 17 00:00:00 2001 From: nr-opensource-bot Date: Sat, 3 Oct 2020 00:59:22 +0000 Subject: [PATCH 1/7] chore(related-content): updated related content data --- src/data/related-pages.json | 8509 +++++++++++++++++------------------ 1 file changed, 4192 insertions(+), 4317 deletions(-) diff --git a/src/data/related-pages.json b/src/data/related-pages.json index 707fe5791..ac0b239d9 100644 --- a/src/data/related-pages.json +++ b/src/data/related-pages.json @@ -1,440 +1,279 @@ { - "/build-apps/add-time-picker-guide": [ + "/collect-data/custom-attributes": [ { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", + "Collect data", + "Guides to collect data", + "Add custom attributes", "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Build queries with NerdGraph", + "Query data with NRQL" ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", + "published_at": "2020-10-02T02:15:06Z", + "title": "Collect data", + "updated_at": "2020-10-02T02:15:06Z", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.07869, + "_score": 153.79254, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add a time picker to your app", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Add custom attributes", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa997328ccbc768c307de2" }, { + "category_2": "Measure DevOps success", + "nodeid": 16556, "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" - ], - "title": "Add tables to your New Relic One application", - "type": "developer", - "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: track experience indicators", + "Prerequisites", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Utilize data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Customer experience improvement: track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-09-30T05:57:38Z", + "updated_at": "2020-09-27T21:45:56Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 125.34398, + "_score": 105.98125, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" + "title": "Customer experience improvement: track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5f5adb2728ccbc7152532752" }, { + "category_2": "Optimize your cloud native environment", + "nodeid": 32796, "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: Track experience indicators", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Use data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-14T01:47:12Z", + "title": "Customer experience improvement: Track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-09-30T16:45:19Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.76801, + "_score": 105.74365, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One apps", - "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" + "title": "Customer experience improvement: Track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5f5ac17528ccbce4f0532733" }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Browser agent release notes", + "nodeid": 40791, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-01T01:54:33Z", - "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "Browser agent release notes", + "Browser Agent v1184", + "Release Dates", + "New Features", + "Added support for custom attributes on PageViewTiming events", + "Issue Resolutions", + "How to upgrade your agent" + ], + "title": "Browser Agent v1184", + "category_0": "Release notes", + "type": "docs", + "category_1": "Browser agent release notes", + "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", + "published_at": "2020-10-02T05:37:45Z", + "updated_at": "2020-10-02T05:37:45Z", + "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 107.245285, + "_score": 103.27701, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add a time picker to your app", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "sections": "Added support for custom attributes on PageViewTiming events", + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f76bca928ccbcaa75337d9b" }, { - "image": "", - "url": "https://developer.newrelic.com/components/platform-state-context/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "PlatformStateContext", - "Usage", - "Props" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-01T01:52:42Z", - "title": "PlatformStateContext", - "updated_at": "2020-08-01T01:47:08Z", + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", - "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 98.98661, + "_score": 96.39448, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "PlatformStateContext", - "sections": "PlatformStateContext", - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component." + "sections": "Add custom attributes", + "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" }, - "id": "5efa997128ccbccc6f307dc0" + "id": "5d6fe49a64441f8d6100a50f" } ], - "/terms": [ + "/automate-workflows/automated-tagging": [ { - "category_2": "Product definitions", - "nodeid": 39646, + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "License information", - "General usage licenses", - "Special services licenses", - "Distributed licenses", - "Referenced policies", - "Product definitions", - "Usage plans", - "FAQ", - "New Relic One pricing: Definitions", - "For more help" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using the Kubernetes operator", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "New Relic One pricing: Definitions", - "category_0": "Licenses", - "type": "docs", - "category_1": "License information", - "external_id": "097fc095ef18942f3af1845237742340e36416b8", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", - "published_at": "2020-09-30T09:49:32Z", - "updated_at": "2020-09-10T14:58:10Z", - "breadcrumb": "Contents / Licenses / License information / Product definitions", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 362.9077, + "_score": 145.57828, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" - }, - "id": "5f23b039196a67030b94f5c4" - }, - { - "category_2": "Data privacy", - "nodeid": 1591, - "sections": [ - "Security and Privacy", - "Data privacy", - "Compliance", - "Information security", - "Security bulletins", - "Security controls for privacy", - "Secured content", - "Analytics", - "Data transmission and firewalls", - "Hosting and data storage", - "Data access", - "HTTP parameters disabled by default", - "For more help" - ], - "title": "Security controls for privacy", - "category_0": "New Relic Security and Privacy", - "type": "docs", - "category_1": "Security and Privacy", - "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", - "image": "", - "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", - "published_at": "2020-09-30T05:11:43Z", - "updated_at": "2020-09-24T07:44:02Z", - "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", - "document_type": "page", - "popularity": 1, - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 359.6443, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Security and Privacy", - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "category_0": "New Relic Security and Privacy", - "category_1": "Security and Privacy", - "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" - }, - "id": "5e30b8a864441f47ebd05cb0" - }, - { - "image": "", - "url": "https://opensource.newrelic.com/cla/", - "sections": [ - "NEW RELIC, INC.", - "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", - "Definitions." - ], - "published_at": "2020-10-01T01:59:27Z", - "title": "New Relic Open Source Contributor License Agreement", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", - "document_type": "page", - "popularity": 1, - "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 351.85486, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" - }, - "id": "5f31822264441fcbe056a984" - }, - { - "category_2": "Developer Edition", - "nodeid": 39641, - "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Developer Program Resources", - "For more help" - ], - "title": "Developer Program Resources", - "category_0": "Licenses", - "type": "docs", - "category_1": "Product or service licenses", - "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", - "published_at": "2020-09-30T09:49:32Z", - "updated_at": "2020-08-08T19:17:02Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", - "document_type": "page", - "popularity": 1, - "info": "New Relic Developer edition policy", - "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 345.98926, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" + "title": "Automate workflows", + "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" }, - "id": "5f338507e7b9d2f670c9de83" + "id": "5efa999c196a67dfb4766445" }, { - "category_2": "New Relic One", - "nodeid": 39366, - "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Preview access for New Relic One", - "For more help" - ], - "title": "Preview access for New Relic One", - "category_0": "Licenses", - "type": "docs", - "category_1": "Product or service licenses", - "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", - "published_at": "2020-10-01T14:37:40Z", - "updated_at": "2020-07-31T04:41:27Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", - "document_type": "page", - "popularity": 1, - "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 337.0799, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" - }, - "id": "5f23a0f7e7b9d29da9c82305" - } - ], - "/automate-workflows/automated-tagging": [ - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", "Automate common tasks", - "Set up New Relic using Terraform" + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.52109, + "_score": 99.44635, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate workflows", - "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "sections": "Automate common tasks", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa999c196a67dfb4766445" + "id": "5d6fe49a64441f8d6100a50f" }, { "category_2": "Measure DevOps success", @@ -467,7 +306,7 @@ "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.02167, + "_score": 92.23883, "_version": null, "_explanation": null, "sort": null, @@ -480,44 +319,47 @@ "id": "5f5e0c14196a67e25fce6a8a" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Examples", + "nodeid": 34236, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "NerdGraph", + "Get started", + "Examples", + "NerdGraph tagging API tutorial", + "Read tags for an entity", + "Add tags for an entity", + "Remove a tag from an entity", + "Delete specific tag values for an entity", + "Replace all tag values for an entity", + "For more help" ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "NerdGraph tagging API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "image": "", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", + "published_at": "2020-09-30T15:47:49Z", + "updated_at": "2020-07-26T05:41:24Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.29491, + "_score": 86.927345, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Automate common tasks", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "NerdGraph tagging API tutorial", + "sections": "NerdGraph tagging API tutorial", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5d8024fc28ccbcc5e9499cf1" }, { "image": "https://newrelic.com/content/dam/hercules-qa/platform_fso_experience_july2020.png", @@ -536,7 +378,7 @@ "CONNECT", "international" ], - "published_at": "2020-10-01T01:42:40Z", + "published_at": "2020-10-02T02:00:13Z", "title": "Full Stack Observability | New Relic", "updated_at": "2020-09-30T02:36:24Z", "type": "", @@ -546,7 +388,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.66892, + "_score": 83.77161, "_version": null, "_explanation": null, "sort": null, @@ -556,300 +398,43 @@ "body": " home. Back to top icon Full-Stack Observability Visualize, analyze, and troubleshoot your entire software stack in one curated, unified platform. And by automatically connecting infrastructure health with application performance and end-user behavior, you can cut through the noise to find the signal" }, "id": "5f22638664441f8d032a48d9" - }, + } + ], + "/build-apps/add-query-mutate-data-nerdstorage": [ { - "category_2": "Optimize your cloud native environment", - "nodeid": 32781, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Adopt cloud services", - "1. Identify services and technologies", - "2. Deploy New Relic Infrastructure", - "3. Configure cloud integrations", - "4. Track data on your dashboards", - "5. Add alerts for cloud-based metrics", - "6. Set up additional monitoring", - "7. CI/CD pipeline integration", - "8. AWS Lambda Monitoring", - "For more help" - ], - "title": "Adopt cloud services", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "182e7d7d0302bc861c09bb94e5a0773bef131e6c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/adopt_cloud.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/adopt-cloud-services", - "published_at": "2020-09-30T18:12:11Z", - "updated_at": "2020-09-27T20:33:59Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", - "document_type": "page", - "popularity": 1, - "info": "Use the New Relic Platform to monitor your modern technologies and cloud services.", - "body": "Whether you've recently completed your cloud migration, have been using cloud-based services for a while, or have always been in the cloud, you may find yourself deploying modern, cutting-edge technologies and services. It's important to develop the ability to adopt new services easily and with confidence; innovation never stops for companies operating in the cloud, and a company's willingness to embrace new technology can give it a major competitive differentiator. These modern technologies could be container solutions such as Docker, Kubernetes, and Amazon AWS ECS or Fargate, for example. Or they could be serverless services such as AWS Lambda, Microsoft Azure, or Google Cloud Platform Functions. They may be cloud-based databases, or any number of cloud services that abstract the service away from an operations-maintained infrastructure. In these situations, you want to monitor, query, and alert on the performance and usage metrics for both modern technologies and cloud-based services. This allows your team to deploy faster, to adopt new services with confidence, to make better business decisions, and in general to expand its technology horizons. Here are the steps to using the New Relic Platform to monitor your modern technologies and cloud services: 1. Identify services and technologies Determine the components you need to monitor by answering the following questions: What cloud-based applications do I have? What are the underlying cloud-based services, technologies, and infrastructure supporting those applications? When you have a full understanding of your architecture, you reduce the possibility of missing dependencies and new services that might impact your organization's application environment. 2. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, install the Infrastructure agent on the hosts you identified in Step One so that you can monitor your cloud services. If you use Ansible, Chef, or Puppet for automation, you can use those tools to deploy Infrastructure agents to your hosts. 3. Configure cloud integrations As you integrate new cloud services, you can use New Relic to monitor and report data about these services; giving you a single, comprehensive overview of your entire architecture. To configure cloud service integrations, link your Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP) service provider account with New Relic. 4. Track data on your dashboards New Relic Infrastructure integrations auto-populate dashboards with metrics from cloud providers like AWS, Azure, and GCP so you can track the data that is critical to your cloud adoption success. If you adopt a hybrid cloud of multiple cloud providers, New Relic can provide a holistic perspective that is agnostic to cloud providers. AWS EC2 monitoring integration dashboard In this default dashboard for the AWS EC2 monitoring integration, New Relic captures metrics for EC2 instances per region, instance state, and instance type. The dashboard also shows inventory for different software packages and configurations that are installed on those instances. infrastructure.newrelic.com > Integrations > Amazon Web Services: View AWS EC2 data on the default dashboard for the AWS EC2 monitoring integration. Azure VMs monitoring integration dashboard The default Azure virtual machine integration dashboard shows data for VM sizes, VMs per region, and VMs per resource group. infrastructure.newrelic.com > Integrations > Microsoft Azure: View Azure virtual machine data on the default dashboard for the Azure VMs monitoring integration. GCP Compute Engine monitoring integration dashboard In this default dashboard for the Google Cloud Platform, New Relic captures metrics for instances per zone, instance status, firewall dropped packets, reserved cores, and disk throttled operations. The dashboard also shows inventory for different software packages and configurations that are installed on those instances. infrastructure.newrelic.com > Integrations > Google Cloud Platform: View GCP Compute Engine data on the default dashboard for the GCP Compute Engine monitoring integration. Example modern and cloud services dashboard In this example dashboard, three different cloud vendors, modern technologies, cloud services, infrastructure instance locations, and DevOps widgets are combined for an overall view. one.newrelic.com > Dashboards: Here is an example of an Insights dashboard with data about vendors, technologies, services, instances, and other important details for DevOps teams. 5. Add alerts for cloud-based metrics When monitoring cloud-based services, it is essential to keep track of all changes to a system by alerting on them. Integrations with New Relic Infrastructure allow you to create alerts on the metrics that are the most important to you. Here is an example of a baseline alert that will notify you based on the number of requests received on all AWS Elastic Load Balancing (ALB) systems for the ALB monitoring integration: alerts.newrelic.com > Alert policies > (selected policy) > Alert conditions: Create a NRQL baseline alert to monitor the number of requests received your ALB systems. 6. Set up additional monitoring In addition to monitoring cloud services, you can deploy New Relic APM, Browser, Mobile, and Synthetics to gain full-stack visibility into all of the components of your applications: Use New Relic APM to report application-tier performance metrics. Use New Relic Browser to report front-end web metrics. Use New Relic Mobile to report front-end mobile app metrics. Use New Relic Synthetics to monitor websites, critical business transactions, and API endpoints. 7. CI/CD pipeline integration It's important to track deployments and the impact that code and infrastructure changes have on your end-user experience. New Relic APM deployment markers allow you to record deployments for each application. A deployment marker is an event indicating that a deployment happened. You can pair markers with metadata from your source code management (SCM) system ( including user IDs, revisions, and change logs.). APM displays a vertical line, or marker, on charts and graphs at the deployment event's timestamp. When you hover over the line, APM displays the associated metadata for that deployment. Tracking deployments is an invaluable way to determine the root causes of immediate, long-term, or gradual degradations in your applications. Recommendation: Make POST requests to the New Relic REST API as the final step of a successful CI/CD deployment, as described in the API documentation. The following tools have integrations or plugins available to help automate CI/CD deployments: Chef (see newrelic_deployment) Jenkins Ansible Puppet 8. AWS Lambda Monitoring New Relic One features an updated APM agent that is highly optimized from a cost and time perspective for ephemeral Lambda functions. Enable New Relic monitoring of AWS Lambda to to assess invocations, error rate, function duration, cold starts, and more. You can also take advantage of New Relic's Infrastructure integration with Lambda for additional reporting capabilities. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.28912, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Optimize your cloud native environment", - "info": "Use the New Relic Platform to monitor your modern technologies and cloud services.", - "category_2": "Optimize your cloud native environment", - "body": " integrations As you integrate new cloud services, you can use New Relic to monitor and report data about these services; giving you a single, comprehensive overview of your entire architecture. To configure cloud service integrations, link your Amazon Web Services (AWS), Microsoft Azure, or Google Cloud", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" - }, - "id": "5f58360d196a673b60ce6aa3" - } - ], - "/collect-data/custom-attributes": [ - { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", - "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Build queries with NerdGraph", - "Collect data - any source", - "Create custom events", - "Query data with NRQL" - ], - "published_at": "2020-10-01T01:55:37Z", - "title": "Collect data", - "updated_at": "2020-09-30T01:47:01Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", - "document_type": "page", - "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.48917, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Add custom attributes", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 10 min Query data with NRQL Query default data, custom events, and attributes" - }, - "id": "5efa997328ccbc768c307de2" - }, - { - "category_2": "Measure DevOps success", - "nodeid": 16556, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: track experience indicators", - "Prerequisites", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Utilize data to separate performance by cohort and debug issues at the customer level", - "For more help" - ], - "title": "Customer experience improvement: track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-09-30T05:57:38Z", - "updated_at": "2020-09-27T21:45:56Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", - "document_type": "page", - "popularity": 1, - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 111.661865, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Customer experience improvement: track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" - }, - "id": "5f5adb2728ccbc7152532752" - }, - { - "category_2": "Optimize your cloud native environment", - "nodeid": 32796, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: Track experience indicators", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Use data to separate performance by cohort and debug issues at the customer level", - "For more help" - ], - "title": "Customer experience improvement: Track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-09-30T16:45:19Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", - "document_type": "page", - "popularity": 1, - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 111.38004, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Customer experience improvement: Track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" - }, - "id": "5f5ac17528ccbce4f0532733" - }, - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", - "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.53135, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Add custom attributes", - "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "category_2": "Custom events", - "nodeid": 13661, - "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" - ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", - "document_type": "page", - "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.019745, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" - }, - "id": "59f4354f4bb81c2ea8b80d0a" - } - ], - "/build-apps/add-query-mutate-data-nerdstorage": [ - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ "Build apps", "Guides to build apps", "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", - "Add, query, and mutate data using NerdStorage", "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-01T01:54:33Z", + "published_at": "2020-10-02T02:16:27Z", "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", + "updated_at": "2020-10-02T02:16:27Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 300.9192, + "_score": 407.869, "_version": null, "_explanation": null, "sort": null, "highlight": { "sections": "Add, query, and mutate data using NerdStorage", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + "body": " your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your" }, "id": "5efa999d64441fc0f75f7e21" }, @@ -873,7 +458,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-01T01:55:37Z", + "published_at": "2020-10-02T02:16:27Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -881,7 +466,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.27647, + "_score": 117.627884, "_version": null, "_explanation": null, "sort": null, @@ -907,7 +492,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", + "published_at": "2020-10-02T02:16:27Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -915,7 +500,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.61125, + "_score": 88.05325, "_version": null, "_explanation": null, "sort": null, @@ -943,7 +528,7 @@ "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-01T01:55:36Z", + "published_at": "2020-10-02T02:10:50Z", "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, @@ -951,7 +536,7 @@ "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return ( ); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 81.371475, + "_score": 78.844635, "_version": null, "_explanation": null, "sort": null, @@ -965,1014 +550,888 @@ "id": "5efa989e28ccbc2f15307deb" }, { - "image": "https://opensource.newrelic.com/static/New_Relic_One_Catalog_Project-044e387f68b03896ff65f46edcffb1f3.png", - "url": "https://opensource.newrelic.com/oss-category/", + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Categories", - "Community Project", - "Requirements", - "Community Plus", - "New Relic One Catalog", - "Example Code", - "New Relic Experimental", - "Archived" - ], - "published_at": "2020-10-01T01:59:26Z", - "title": "New Relic Open Source Categories", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "87c1876d27bdde7fb6636382fb5e659ae47c496a", + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" + ], + "published_at": "2020-10-02T02:15:06Z", + "title": "Collect data", + "updated_at": "2020-10-02T02:15:06Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects Categories Community Project Community Plus New Relic One Catalog Example Code New Relic Experimental Archived For the code snippets that appear in the project's README file, see this documentation. Community Project This code is developed in the open with input from the community through issues and PRs. There is an active maintainer team within New Relic, troubleshooting support in the New Relic Explorers Hub, and the documentation is available in the project repository. Requirements Complies with New Relic's legal and security requirements for open source software Contains the appropriate New Relic open source category header in the repository's README file Has active maintainer / maintainers, including at least one Relic Troubleshooting support via the New Relic Explorers Hub Issues and PR’s managed in GitHub Documentation reviewed by the New Relic documentation team Linted code An automated release pipeline Community Plus This code is developed in the open with input from the community through issues and PRs. A New Relic engineering team serves as the maintainer. Troubleshooting support is available in the New Relic Explorers Hub, and documentation is available in the project repository and docs.newrelic.com. Requirements Complies with New Relic's legal and security requirements for open source software Contains the appropriate New Relic open source category header in the repository's README file Is maintained by a New Relic engineering team Troubleshooting support via the New Relic Explorers Hub Issues and PR’s managed in GitHub For additional details on support options, see the Open Source Support Policy Documentation reviewed by the New Relic documentation team Linted code An automated release pipeline New Relic One Catalog This code is a part of the New Relic One Catalog. It meets the criteria for a Community Project; but it also contains UI workflows for configuration. Most Catalog projects seek to maintain a public roadmap, often expressed in a GitHub Project board and Issues within the repository. Requirements All the requirements of a Community Project An empty state application workflow that guides users through the setup of configuration data that is stored in NerdStorage Architectural review (including UX) by New Relic (Optional) maintains a public roadmap (recommended via a GitHub project in the repo) Example Code This code demonstrates an aspect of building on the New Relic One platform. Find the complete description of its usage and other relevant docs in the README. There is no long-term maintainer for this code nor is support provided, but the author(s) may address future updates / needs as platform features change. Requirements Complies with New Relic's legal and security requirements for open source software Contains the appropriate New Relic open source category header in the repository's README file (optional) Issues are available at the project author's discretion Documentation reviewed by the New Relic documentation team Linted code New Relic Experimental This code solves an interesting problem but does not yet have an active maintainer(s). The project is being developed in the open for the purpose of feedback on a new feature or function. Requirements Complies with New Relic's legal and security requirements for open source software Contains the appropriate New Relic open source category header in the repository's README file Typically hosted in the New Relic Experimental GitHub org (Optional) Issues at the project owner's discertion Archived This code is read-only. There is neither a maintainer team nor support. Requirements Complies with New Relic's legal requirements for open source software Contains the appropriate New Relic open source category header in the repository's README file Previous references to Support should be modified or removed from the README Project is read-only and available for cloning only New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 72.19199, + "_score": 76.49695, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " a public roadmap, often expressed in a GitHub Project board and Issues within the repository. Requirements All the requirements of a Community Project An empty state application workflow that guides users through the setup of configuration data that is stored in NerdStorage Architectural review (including" + "title": "Collect data", + "sections": "Query data with NRQL", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5f31822228ccbc916988dff8" + "id": "5efa997328ccbc768c307de2" } ], - "/build-apps/publish-deploy": [ + "/build-apps/howto-use-nrone-table-components": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/components/table-header-cell/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "TableHeaderCell", + "Usage", + "Props" ], - "published_at": "2020-10-01T01:54:33Z", - "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", + "published_at": "2020-10-02T02:19:13Z", + "title": "TableHeaderCell", + "updated_at": "2020-08-03T04:46:36Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.65753, + "_score": 507.8309, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" - }, - "id": "5efa999d64441fc0f75f7e21" + "title": "TableHeaderCell", + "sections": "TableHeaderCell", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component." + }, + "id": "5efa9906196a67523e76646e" }, { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Permissions for managing applications", + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" - ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-01T01:54:33Z", - "updated_at": "2020-09-02T02:04:41Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 61.755806, + "_score": 416.98404, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "managing apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5f45bf2864441ffb4dfdcdbb" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Hosting services", - "nodeid": 13151, + "image": "", + "url": "https://developer.newrelic.com/components/table-row/", "sections": [ - "Node.js agent", - "Getting started", - "Installation and configuration", - "Supported features", - "Attributes", - "API guides", - "Hosting services", - "Troubleshooting", - "Install New Relic Node.js agent in GAE flexible environment", - "Use native deploy", - "Build a custom runtime", - "Optional: Disable health checks", - "Get New Relic agent troubleshooting logs from GAE", - "For more help" + "TableRow", + "Usage", + "Props" ], - "title": "Install New Relic Node.js agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Node.js agent", - "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", - "published_at": "2020-09-30T06:43:04Z", - "updated_at": "2020-08-18T06:29:37Z", - "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "published_at": "2020-10-02T02:16:27Z", + "title": "TableRow", + "updated_at": "2020-08-03T04:45:42Z", + "type": "developer", + "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", "document_type": "page", "popularity": 1, - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 32.172714, + "_score": 416.6728, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use native deploy", - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + "title": "TableRow", + "sections": "TableRow", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component." }, - "id": "5972fea707552313d3f9ba8d" + "id": "5efa98d564441f93435f7e24" }, { - "category_2": "Hosting services", - "nodeid": 13866, + "category_2": "Cloud adoption", + "nodeid": 16121, "sections": [ - "Python agent", - "Getting started", - "Installation", - "Configuration", - "Supported features", - "Back-end services", - "Custom instrumentation", - "API guides", - "Python agent API", - "Web frameworks and servers", - "Hosting services", - "Attributes", - "Troubleshooting", - "Install the Python agent in GAE flexible environment", - "Deploy using GAE's native support", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Create application baselines", + "1. Identify components", + "2. Determine compatibility", + "3. Deploy monitoring", + "4. Gather metrics", + "5. Set up Dashboards", + "Expert tips", "For more help" ], - "title": "Install the Python agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Create application baselines", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "Python agent", - "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "category_1": "New Relic solutions", + "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", "image": "", - "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", - "published_at": "2020-09-30T12:16:08Z", - "updated_at": "2020-08-30T17:24:26Z", - "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", + "published_at": "2020-09-30T04:42:24Z", + "updated_at": "2020-09-27T20:07:57Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 21.937527, + "_score": 318.07715, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Deploy using GAE's native support", - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + "title": "Create application baselines", + "sections": "1. Identify components", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" }, - "id": "5f3fb624196a672fda1cd4a3" + "id": "5ad48685c75d0766faa181bd" }, { - "category_2": "Installation", - "nodeid": 13121, "sections": [ - "Go agent", - "Get started", - "Installation", - "Configuration", - "Instrumentation", - "API guides", - "Features", - "Troubleshooting", - "Install the Go agent in GAE flexible environment", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Install the Go agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Go agent", - "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", - "published_at": "2020-09-30T06:40:18Z", - "updated_at": "2020-08-15T09:48:00Z", - "breadcrumb": "Contents / APM agents / Go agent / Installation", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-02T02:15:05Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 20.141912, + "_score": 298.42667, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + "title": "Map page views by region in a custom app", + "sections": "Import the TableChart component", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" }, - "id": "5f37af50196a67d8f955e63e" + "id": "5efa993c196a67066b766469" } ], - "/automate-workflows/kubernetes-helm-deployment": [ + "/build-apps/add-time-picker-guide": [ { "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 4571.5693, + "_score": 149.53502, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "title": "Build apps", + "sections": "Add a time picker to your app", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Enable log monitoring", - "nodeid": 34166, + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Kubernetes plugin for log forwarding", - "Requirements", - "Enable Kubernetes for logs management", - "View log data", - "What's next?", - "For more help" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Kubernetes plugin for log forwarding", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", - "published_at": "2020-09-30T15:46:39Z", - "updated_at": "2020-09-27T16:17:57Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 136.71332, + "_score": 149.32797, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + "sections": "Add a time picker to your app", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5f37c1d064441f0d21a0a5e1" + "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Enable and configure", - "nodeid": 38171, "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-09-30T14:39:10Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "title": "Add tables to your New Relic One application", + "type": "developer", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-02T02:16:28Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.38651, + "_score": 119.745964, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 2. (Infinite Tracing) Set up a trace observer", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" }, - "id": "5ea0617064441ff137912311" + "id": "5efa989ee7b9d2ad567bab51" }, { - "category_2": "Private locations", - "nodeid": 23821, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Install containerized private minions (CPMs)", - "General private minion features", - "Kubernetes-specific features", - "System requirements and compatibility", - "Private location key", - "Sandboxing and Docker dependencies", - "Install and update CPM versions", - "Start the CPM", - "Stop or delete the CPM", - "Show help and examples", - "Show license information", - "Configure CPM", - "Networks", - "Security, sandboxing, and running as non-root", - "Docker image repository", - "Additional considerations for CPM connection", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Install containerized private minions (CPMs)", - "category_0": "Synthetic monitoring", - "type": "docs", - "category_1": "Synthetic monitoring", - "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", - "published_at": "2020-09-30T17:09:10Z", - "updated_at": "2020-08-13T23:22:19Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-02T02:19:13Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 117.17629, + "_score": 118.78988, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Using monitors", - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + "tags": "New Relic One apps", + "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" }, - "id": "5f31d981196a678103fbd731" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Cloud adoption", - "nodeid": 16176, + "image": "", + "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Optimize your cloud spend", - "1. Deploy the New Relic Infrastructure agent", - "2. Create dashboard charts for cloud performance", - "3. Configure the Amazon AWS integration", - "4. Set up billing budgets in AWS", - "5. Add cloud spend and budget widgets to Insights dashboard", - "6. Create dashboards for every level of your organization", - "7. Set up alerts", - "For more help" + "PlatformStateContext", + "Usage", + "Props" ], - "title": "Optimize your cloud spend", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", - "published_at": "2020-09-30T04:51:45Z", - "updated_at": "2020-09-27T22:50:50Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", + "published_at": "2020-10-02T02:16:27Z", + "title": "PlatformStateContext", + "updated_at": "2020-08-01T01:47:08Z", + "type": "developer", + "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", "document_type": "page", "popularity": 1, - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.09521, + "_score": 93.77365, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" + "title": "PlatformStateContext", + "sections": "PlatformStateContext", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component." }, - "id": "5f59fc5b196a672f27ce6a45" + "id": "5efa997128ccbccc6f307dc0" } ], - "/collect-data/query-data-nrql": [ + "/terms": [ { - "category_2": "Alert conditions", - "nodeid": 9231, + "category_2": "Product definitions", + "nodeid": 39646, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "License information", + "General usage licenses", + "Special services licenses", + "Distributed licenses", + "Referenced policies", + "Product definitions", + "Usage plans", + "FAQ", + "New Relic One pricing: Definitions", "For more help" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", + "title": "New Relic One pricing: Definitions", + "category_0": "Licenses", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "category_1": "License information", + "external_id": "097fc095ef18942f3af1845237742340e36416b8", + "image": "", + "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", + "published_at": "2020-09-30T09:49:32Z", + "updated_at": "2020-09-10T14:58:10Z", + "breadcrumb": "Contents / Licenses / License information / Product definitions", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 161.7858, + "_score": 360.31372, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "NRQL alert syntax", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5f23b039196a67030b94f5c4" }, { - "category_2": "Custom events", - "nodeid": 13661, + "image": "", + "url": "https://opensource.newrelic.com/cla/", "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "NEW RELIC, INC.", + "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", + "Definitions." ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "published_at": "2020-10-02T02:24:42Z", + "title": "New Relic Open Source Contributor License Agreement", + "updated_at": "2020-09-02T02:08:45Z", + "type": "opensource", + "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", + "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 135.8967, + "_score": 350.71548, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Event data sources", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5f31822264441fcbe056a984" }, { - "category_2": "Get started", - "nodeid": 11431, + "category_2": "Data privacy", + "nodeid": 1591, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Introduction to NRQL, New Relic's query language", - "What is NRQL?", - "Where can you use NRQL?", - "What data can you query with NRQL?", - "Start using NRQL", - "NRQL query examples", - "NRQL syntax", + "Security and Privacy", + "Data privacy", + "Compliance", + "Information security", + "Security bulletins", + "Security controls for privacy", + "Secured content", + "Analytics", + "Data transmission and firewalls", + "Hosting and data storage", + "Data access", + "HTTP parameters disabled by default", "For more help" ], - "title": "Introduction to NRQL, New Relic's query language", - "category_0": "Query your data", + "title": "Security controls for privacy", + "category_0": "New Relic Security and Privacy", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "published_at": "2020-09-30T12:11:32Z", - "updated_at": "2020-09-24T08:40:20Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", + "category_1": "Security and Privacy", + "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "image": "", + "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", + "published_at": "2020-09-30T05:11:43Z", + "updated_at": "2020-09-24T07:44:02Z", + "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", "document_type": "page", "popularity": 1, - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.00812, + "_score": 350.11676, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Introduction to NRQL, New Relic's query language", - "sections": "What data can you query with NRQL?", - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + "sections": "Security and Privacy", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "category_0": "New Relic Security and Privacy", + "category_1": "Security and Privacy", + "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" }, - "id": "5f2abd47196a67747343fbe1" + "id": "5e30b8a864441f47ebd05cb0" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "category_2": "Developer Edition", + "nodeid": 39641, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Developer Program Resources", "For more help" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", + "title": "Developer Program Resources", + "category_0": "Licenses", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "category_1": "Product or service licenses", + "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", + "image": "", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", + "published_at": "2020-09-30T09:49:32Z", + "updated_at": "2020-08-08T19:17:02Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic Developer edition policy", + "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 110.14871, + "_score": 345.99283, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5f338507e7b9d2f670c9de83" }, { - "category_2": "Ingest APIs", - "nodeid": 35526, + "category_2": "New Relic One", + "nodeid": 39366, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Metric API limits and restricted attributes", - "Endpoint requirements and maximum limits", - "Rate limit violations", - "Restricted attributes", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Preview access for New Relic One", "For more help" ], - "title": "Metric API limits and restricted attributes", - "category_0": "Telemetry Data Platform", + "title": "Preview access for New Relic One", + "category_0": "Licenses", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "category_1": "Product or service licenses", + "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", - "published_at": "2020-09-30T16:59:39Z", - "updated_at": "2020-09-27T21:34:10Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", + "published_at": "2020-10-01T14:37:40Z", + "updated_at": "2020-07-31T04:41:27Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", "document_type": "page", "popularity": 1, - "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", - "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 50k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 50k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 83.95404, + "_score": 337.33054, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Ingest and manage data", - "category_0": "Telemetry Data Platform", - "category_1": "Ingest and manage data", - "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" }, - "id": "5f24e4ede7b9d28743c8231c" + "id": "5f23a0f7e7b9d29da9c82305" } ], - "/explore-docs/nr1-plugins": [ - { - "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 250.00688, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" - }, - "id": "5efa989e28ccbc535a307dd0" - }, + "/automate-workflows/5-mins-tag-resources": [ { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "New Relic CLI Reference", + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 134.74843, + "_score": 179.33524, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5d6fe49a64441f8d6100a50f" }, { "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using the Kubernetes operator", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.66484, + "_score": 110.57555, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5efa999c196a67dfb4766445" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Get started with the New Relic CLI", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Get your application details", + "Add a simple tag to your application", + "Bonus step: Create a deployment marker", + "Next steps" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "title": "Get started with the New Relic CLI", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "tags": [ + "api key", + "New Relic CLI", + "Tags", + "Entity", + "Deployment markers" + ], + "external_id": "531f2f3985bf64bb0dc92a642445887095048882", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", + "published_at": "2020-10-02T02:15:06Z", + "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.13306, + "_score": 100.429504, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "Get started with the New Relic CLI", + "sections": "Get started with the New Relic CLI", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "tags": "New Relic CLI", + "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5efa999c196a67c4e1766461" }, { + "category_2": "Troubleshooting", + "nodeid": 40351, "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" - ], - "title": "Quickly tag a set of resources", - "type": "developer", - "tags": [ - "tags", - "new relic CLI" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Tag information not showing up for entity in Infra alert condition", + "Problem", + "Solution", + "Cause", + "For more help" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "title": "Tag information not showing up for entity in Infra alert condition", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-01T01:54:34Z", - "updated_at": "2020-08-14T01:45:08Z", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", + "published_at": "2020-09-30T09:38:17Z", + "updated_at": "2020-09-30T09:38:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", + "document_type": "troubleshooting_doc", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "Tags from events not indexed by New Relic do not appear.", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.43251, + "_score": 91.791504, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Install the New Relic CLI", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "title": "Tag information not showing up for entity in Infra alert condition", + "sections": "New Relic Alerts", + "info": "Tags from events not indexed by New Relic do not appear.", + "category_1": "New Relic Alerts", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" }, - "id": "5efa999d64441fa74a5f7e2d" - } - ], - "/explore-docs/nr1-common": [ + "id": "5f4c3992e7b9d2c2d203eddd" + }, { "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Infrastructure agent release notes", + "Browser agent release notes", + "Synthetics private minion release notes", + "Containerized private minions release notes", + "Mobile agent release notes", + "iOS release notes", + "XCFramework release notes", + "Android release notes", + "tvOS release notes", + "Mobile apps release notes", + "New Relic for Android release notes", + "Insights for tvOS release notes", + "New Relic for iOS release notes", + "Insights for Android release notes", + "Insights for iOS release notes", + "Pages" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", + "title": "New Relic Platform release notes", + "type": "docs", + "external_id": "417582d1ccf7ed32d7bf3d5059920da59a8254cd", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes", + "published_at": "2020-10-01T02:40:46Z", + "updated_at": "2020-10-01T02:40:46Z", + "breadcrumb": "Contents", + "document_type": "views_page_content", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "body": "New Relic platform release notes include information on new or updated features or functionality to New Relic products (for example: user interface changes, a new REST API call, changes to how data is reported to a given product, etc). Releases are categorized by the type of impact they have on end-users: Bug fixes: For minor non-breaking fixes to features or functionality. Changes: For significant changes to features or functionality that could break a user’s experience, tooling, processes, etc. New: For new features or functionality. For release information on downloadable/versioned New Relic software (such as APM agents, the Browser agent, Synthetics minions, etc.), see Release notes. Release Impact Bug Fixes Changes New Products Alerts APM Browser Cloud Integrations Infrastructure Insights Mobile New Relic Diagnostics On-Host Integrations Synthetics Date Release Name Products Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020 New Relic integration for Kubernetes 1.26.4 Infrastructure Bug Fixes September 9, 2020 3 new integrations available for Azure and AWS Cloud Integrations New September 7, 2020 New Relic integration for Kubernetes 1.26.2 Infrastructure, On-Host Integrations Changes August 26, 2020 New Relic integration for Kubernetes 1.26.1 Infrastructure, On-Host Integrations Changes August 20, 2020 1 new integrations available for AWS and new statistics Cloud Integrations New August 18, 2020 08-18-2020 : Fixed : Missing Synthetics Labels / Tags on Synthetics Violations Alerts Bug Fixes August 13, 2020 New Relic integration for Kubernetes 1.26.0 Infrastructure, On-Host Integrations Changes, New Pages 1 2 3 4 5 6 7 8 9 … next › last »", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 214.36946, + "_score": 90.933685, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "title": "New Relic Platform release notes", + "sections": "New Relic Platform release notes", + "body": " Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020" }, - "id": "5efa989e28ccbc535a307dd0" - }, + "id": "5ae1a73a0cc37f6c7bbedee4" + } + ], + "/build-apps/map-pageviews-by-region": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -1992,62 +1451,27 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-01T01:45:23Z", + "published_at": "2020-10-02T02:09:27Z", "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 141.41675, + "_score": 161.08292, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Create a custom map view", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 134.74843, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, { "sections": [ "Set up your development environment", @@ -2068,7 +1492,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-01T01:54:33Z", + "published_at": "2020-10-02T02:13:49Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -2076,170 +1500,56 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.556854, + "_score": 113.29813, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" }, "id": "5efa9973e7b9d242237bab39" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "title": "Intro to NerdStorage", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.42615, + "_score": 94.511086, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + "sections": "Use NerdStorage in your apps", + "tags": "new relic one apps", + "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" }, - "id": "5efa999c196a67dfb4766445" - } - ], - "/build-apps/map-pageviews-by-region": [ - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", - "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.29784, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Create a custom map view", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-01T01:54:33Z", - "updated_at": "2020-08-26T01:47:20Z", - "document_type": "page", - "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.62275, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" - }, - "id": "5efa9973e7b9d242237bab39" - }, - { - "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-01T01:55:37Z", - "updated_at": "2020-09-08T01:50:19Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.05426, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Use NerdStorage in your apps", - "tags": "new relic one apps", - "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" - }, - "id": "5efa989ee7b9d2048e7bab92" - }, + "id": "5efa989ee7b9d2048e7bab92" + }, { "sections": [ "Serve, publish, and deploy your New Relic One app", @@ -2267,7 +1577,7 @@ "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:16:27Z", "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, @@ -2275,7 +1585,7 @@ "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.31191, + "_score": 91.10339, "_version": null, "_explanation": null, "sort": null, @@ -2326,7 +1636,7 @@ "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.258705, + "_score": 88.2238, "_version": null, "_explanation": null, "sort": null, @@ -2358,18 +1668,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-01T01:45:23Z", + "published_at": "2020-10-02T02:09:27Z", "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 306.68027, + "_score": 328.6854, "_version": null, "_explanation": null, "sort": null, @@ -2393,7 +1703,7 @@ "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-01T01:54:34Z", + "published_at": "2020-10-02T02:19:13Z", "title": "Automate workflows", "updated_at": "2020-09-25T01:49:59Z", "type": "developer", @@ -2404,7 +1714,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 223.35062, + "_score": 214.41782, "_version": null, "_explanation": null, "sort": null, @@ -2414,6 +1724,52 @@ }, "id": "5efa999c196a67dfb4766445" }, + { + "sections": [ + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" + ], + "title": "Quickly tag a set of resources", + "type": "developer", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-14T01:45:08Z", + "document_type": "page", + "popularity": 1, + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 182.31738, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Quickly tag a set of resources", + "sections": "Install the New Relic CLI", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + }, + "id": "5efa999d64441fa74a5f7e2d" + }, { "category_2": "Troubleshooting", "nodeid": 40351, @@ -2451,7 +1807,7 @@ "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 193.8602, + "_score": 179.45114, "_version": null, "_explanation": null, "sort": null, @@ -2496,7 +1852,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 188.15189, + "_score": 175.28989, "_version": null, "_explanation": null, "sort": null, @@ -2508,180 +1864,465 @@ "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" }, "id": "5f735c6928ccbc5f5d337dbb" - }, + } + ], + "/collect-data/custom-events": [ { + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" - ], - "title": "Quickly tag a set of resources", - "type": "developer", - "tags": [ - "tags", - "new relic CLI" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-01T01:54:34Z", - "updated_at": "2020-08-14T01:45:08Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-09-30T07:36:03Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 184.96494, + "_score": 107.99643, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Quickly tag a set of resources", - "sections": "Install the New Relic CLI", - "info": "Add tags to applications you instrument for easier filtering and organization.", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "title": "Data requirements and limits for custom event data", + "sections": "Custom events", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa999d64441fa74a5f7e2d" - } - ], - "/automate-workflows/5-mins-tag-resources": [ + "id": "59f4354f4bb81c2ea8b80d0a" + }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Logs in context with agent APIs", + "nodeid": 36921, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Annotate logs for logs in context using APM agent APIs", + "APM agent trace metadata and linking metadata APIs", + "Resources for correctly annotating logs", + "For more help" ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Annotate logs for logs in context using APM agent APIs", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", + "published_at": "2020-09-30T16:27:58Z", + "updated_at": "2020-09-27T21:36:25Z", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 168.23569, + "_score": 94.31723, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { + "title": "Annotate logs for logs in context using APM agent APIs", + "sections": "Logs in context with agent APIs", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "category_2": "Logs in context with agent APIs", + "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" + }, + "id": "5f37535c196a67c8c055e5ff" + }, + { + "category_2": "Custom events", + "nodeid": 6256, + "sections": [ + "Event data sources", + "Default events", + "Custom events", + "APM: Report custom events", + "Data considerations", + "Record a custom event", + "Timestamps", + "Limits and restricted characters", + "Reserved words", + "For more help" + ], + "title": "APM: Report custom events", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "published_at": "2020-09-30T10:58:45Z", + "updated_at": "2020-09-24T07:10:11Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "document_type": "page", + "popularity": 1, + "info": "New Relic APM: how to report custom events and attributes.", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 77.013916, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "APM: Report custom events", + "sections": "Custom events", + "info": "New Relic APM: how to report custom events and attributes.", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" + }, + "id": "5f480a5a64441f578bfdcdb1" + }, + { + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-09-30T06:47:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "document_type": "page", + "popularity": 1, + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 57.6333, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Report custom event data", + "sections": "Custom events", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" + }, + "id": "5e8e7f9de7b9d2aa122cf0f6" + }, + { + "sections": [ + "Collect data from any source", + "Agent APIs", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API", + "Log API" + ], + "title": "Collect data from any source", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "tags": [ + "Agent API", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API" + ], + "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", + "image": "", + "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", + "published_at": "2020-10-02T02:15:06Z", + "updated_at": "2020-08-14T01:45:09Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 54.88908, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Agent APIs", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "tags": "Agent API", + "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" + }, + "id": "5efa997128ccbc3c9a307dfd" + } + ], + "/build-apps/publish-deploy": [ + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.82114, + "_score": 169.40805, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa999d64441fc0f75f7e21" }, { "sections": [ - "Get started with the New Relic CLI", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Get your application details", - "Add a simple tag to your application", - "Bonus step: Create a deployment marker", - "Next steps" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "Get started with the New Relic CLI", + "title": "Permissions for managing applications", "type": "developer", "tags": [ - "api key", - "New Relic CLI", - "Tags", - "Entity", - "Deployment markers" + "nerdpack manager", + "permissions", + "managing apps" ], - "external_id": "531f2f3985bf64bb0dc92a642445887095048882", + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-08-08T01:41:47Z", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-02T02:13:50Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 102.0241, + "_score": 60.973907, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Get started with the New Relic CLI", - "sections": "Get started with the New Relic CLI", - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "tags": "New Relic CLI", - "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "managing apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5efa999c196a67c4e1766461" + "id": "5f45bf2864441ffb4dfdcdbb" }, { - "category_2": "Troubleshooting", - "nodeid": 40351, + "category_2": "Hosting services", + "nodeid": 13151, + "sections": [ + "Node.js agent", + "Getting started", + "Installation and configuration", + "Supported features", + "Attributes", + "API guides", + "Hosting services", + "Troubleshooting", + "Install New Relic Node.js agent in GAE flexible environment", + "Use native deploy", + "Build a custom runtime", + "Optional: Disable health checks", + "Get New Relic agent troubleshooting logs from GAE", + "For more help" + ], + "title": "Install New Relic Node.js agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Node.js agent", + "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", + "published_at": "2020-09-30T06:43:04Z", + "updated_at": "2020-08-18T06:29:37Z", + "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "document_type": "page", + "popularity": 1, + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 31.869926, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Use native deploy", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + }, + "id": "5972fea707552313d3f9ba8d" + }, + { + "category_2": "Hosting services", + "nodeid": 13866, + "sections": [ + "Python agent", + "Getting started", + "Installation", + "Configuration", + "Supported features", + "Back-end services", + "Custom instrumentation", + "API guides", + "Python agent API", + "Web frameworks and servers", + "Hosting services", + "Attributes", + "Troubleshooting", + "Install the Python agent in GAE flexible environment", + "Deploy using GAE's native support", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" + ], + "title": "Install the Python agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Python agent", + "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", + "published_at": "2020-09-30T12:16:08Z", + "updated_at": "2020-08-30T17:24:26Z", + "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "document_type": "page", + "popularity": 1, + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 21.70191, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Deploy using GAE's native support", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + }, + "id": "5f3fb624196a672fda1cd4a3" + }, + { + "category_2": "Installation", + "nodeid": 13121, + "sections": [ + "Go agent", + "Get started", + "Installation", + "Configuration", + "Instrumentation", + "API guides", + "Features", + "Troubleshooting", + "Install the Go agent in GAE flexible environment", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" + ], + "title": "Install the Go agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Go agent", + "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", + "published_at": "2020-09-30T06:40:18Z", + "updated_at": "2020-08-15T09:48:00Z", + "breadcrumb": "Contents / APM agents / Go agent / Installation", + "document_type": "page", + "popularity": 1, + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 19.987856, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + }, + "id": "5f37af50196a67d8f955e63e" + } + ], + "/automate-workflows/get-started-kubernetes": [ + { + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ "New Relic Alerts", "Get started", @@ -2694,43 +2335,55 @@ "Rules, limits, and glossary", "Alerts and Nerdgraph", "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Tag information not showing up for entity in Infra alert condition", + "title": "Create NRQL alert conditions", "category_0": "Alerts and Applied Intelligence", "type": "docs", "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-09-30T09:38:17Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-09-30T20:06:36Z", + "updated_at": "2020-09-30T20:06:35Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "document_type": "page", "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.26372, + "_score": 114.384796, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "title": "Create NRQL alert conditions", + "sections": "Create NRQL alert conditions", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5f4c3992e7b9d2c2d203eddd" + "id": "5f2d992528ccbc489d88dfc1" }, { + "category_2": "Alerts release notes", + "nodeid": 40776, "sections": [ "New Relic Platform release notes", "Alerts release notes", @@ -2739,432 +2392,487 @@ "Diagnostics release notes", "Mobile release notes", "Kubernetes integration release notes", - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Infrastructure agent release notes", - "Browser agent release notes", - "Synthetics private minion release notes", - "Containerized private minions release notes", - "Mobile agent release notes", - "iOS release notes", - "XCFramework release notes", - "Android release notes", - "tvOS release notes", - "Mobile apps release notes", - "New Relic for Android release notes", - "Insights for tvOS release notes", - "New Relic for iOS release notes", - "Insights for Android release notes", - "Insights for iOS release notes", - "Pages" + "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "Component: NRQL Conditions (Review Required)", + "Announcing : New Relic One Streaming Alerts", + "Please read the full announcement and FAQ here , and follow the links to enroll." + ], + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_0": "Release notes", + "type": "docs", + "category_1": "New Relic Platform release notes", + "external_id": "74ae41c7360962287ea605016bf7731035382166", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", + "published_at": "2020-09-30T09:07:43Z", + "updated_at": "2020-09-29T22:06:08Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", + "popularity": 1, + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 106.77788, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_2": "Alerts release notes", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" + }, + "id": "5f735c6964441f8a6aeb7297" + }, + { + "category_2": "Alert conditions", + "nodeid": 7261, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Set thresholds for an alert condition", + "What is a threshold?", + "View and set thresholds", + "For more help" ], - "title": "New Relic Platform release notes", + "title": "Set thresholds for an alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "external_id": "417582d1ccf7ed32d7bf3d5059920da59a8254cd", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes", - "published_at": "2020-10-01T02:40:46Z", - "updated_at": "2020-10-01T02:40:46Z", - "breadcrumb": "Contents", - "document_type": "views_page_content", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "published_at": "2020-09-30T13:34:48Z", + "updated_at": "2020-09-30T13:34:48Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "document_type": "page", "popularity": 1, - "body": "New Relic platform release notes include information on new or updated features or functionality to New Relic products (for example: user interface changes, a new REST API call, changes to how data is reported to a given product, etc). Releases are categorized by the type of impact they have on end-users: Bug fixes: For minor non-breaking fixes to features or functionality. Changes: For significant changes to features or functionality that could break a user’s experience, tooling, processes, etc. New: For new features or functionality. For release information on downloadable/versioned New Relic software (such as APM agents, the Browser agent, Synthetics minions, etc.), see Release notes. Release Impact Bug Fixes Changes New Products Alerts APM Browser Cloud Integrations Infrastructure Insights Mobile New Relic Diagnostics On-Host Integrations Synthetics Date Release Name Products Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020 New Relic integration for Kubernetes 1.26.4 Infrastructure Bug Fixes September 9, 2020 3 new integrations available for Azure and AWS Cloud Integrations New September 7, 2020 New Relic integration for Kubernetes 1.26.2 Infrastructure, On-Host Integrations Changes August 26, 2020 New Relic integration for Kubernetes 1.26.1 Infrastructure, On-Host Integrations Changes August 20, 2020 1 new integrations available for AWS and new statistics Cloud Integrations New August 18, 2020 08-18-2020 : Fixed : Missing Synthetics Labels / Tags on Synthetics Violations Alerts Bug Fixes August 13, 2020 New Relic integration for Kubernetes 1.26.0 Infrastructure, On-Host Integrations Changes, New Pages 1 2 3 4 5 6 7 8 9 … next › last »", - "info": "", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.01276, + "_score": 100.478226, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Platform release notes", - "sections": "New Relic Platform release notes", - "body": " Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020" + "title": "Set thresholds for an alert condition", + "sections": "Alert conditions", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5ae1a73a0cc37f6c7bbedee4" - } - ], - "/explore-docs/nr1-config": [ + "id": "5f2d847c64441fc0a656a98a" + }, { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using the Kubernetes operator", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "New Relic One CLI reference", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 252.84277, + "_score": 96.83328, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "sections": "Set up New Relic using the Kubernetes operator", + "body": " it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5efa999c196a67dfb4766445" }, { + "category_2": "Understand and use data", + "nodeid": 37981, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Elastic Container Service integration", + "Get started", + "Install", + "Understand and use data", + "Troubleshooting", + "Recommended ECS alert conditions", + "Recommended alert conditions", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "Recommended ECS alert conditions", + "category_0": "Integrations", + "type": "docs", + "category_1": "Elastic Container Service integration", + "external_id": "304f01e7a5c68e9ef4dc76782eb9ff6847854065", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/integrations/elastic-container-service-integration/understand-use-data/ecs-integration-recommended-alert-conditions", + "published_at": "2020-09-30T14:33:21Z", + "updated_at": "2020-08-06T00:29:40Z", + "breadcrumb": "Contents / Integrations / Elastic Container Service integration / Understand and use data", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", + "body": "New Relic's ECS integration reports and displays performance data from your Amazon ECS environment. This document provides some recommended alert conditions for monitoring ECS performance. Recommended alert conditions Here are some recommended ECS alert conditions. To add these alerts, go to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80% for 5 minutes Restart count NRQL: FROM ContainerSample SELECT max(restartCount) - min(restartCount) Critical: > 5 for 5 minutes For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 157.74876, + "_score": 60.94577, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "Recommended ECS alert conditions", + "sections": "Recommended ECS alert conditions", + "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", + "body": " to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80" }, - "id": "5efa989ee7b9d2024b7bab97" - }, + "id": "5ee05e9e28ccbcef4f4c8dda" + } + ], + "/collect-data/collect-data-from-any-source": [ { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Ingest APIs", + "nodeid": 35471, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Telemetry SDKs: Report custom telemetry data", + "Requirements and compatibility", + "Available libraries", + "Write your own Telemetry SDK or contribute to an existing one", + "Integrations built with the Telemetry SDKs", + "For more help" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Telemetry SDKs: Report custom telemetry data", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", + "published_at": "2020-09-30T19:06:43Z", + "updated_at": "2020-09-17T14:37:52Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.66484, + "_score": 167.56425, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "title": "Telemetry SDKs: Report custom telemetry data", + "sections": "Telemetry SDKs: Report custom telemetry data", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "category_0": "Telemetry Data Platform", + "category_2": "Ingest APIs", + "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5d89fefbe7b9d2537ed30dc1" }, { + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-01T01:54:33Z", - "updated_at": "2020-08-26T01:47:20Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-09-30T06:47:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.46568, + "_score": 99.921265, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "Report custom event data", + "sections": "Event data sources", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", + "category_2": "Get started", + "nodeid": 36051, "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Get data into New Relic", + "New Relic-built agents and integrations", + "Agent APIs", + "Telemetry SDKs", + "APIs for sending metrics, traces, logs, and events", + "New Relic One applications", + "For more help" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", - "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "title": "Get data into New Relic", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", + "published_at": "2020-09-30T16:13:27Z", + "updated_at": "2020-08-10T23:16:39Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "An introduction to how to get data into New Relic. ", + "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.13306, + "_score": 99.4702, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "sections": "APIs for sending metrics, traces, logs, and events", + "category_0": "Telemetry Data Platform", + "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" }, - "id": "5f28bd6a64441f9817b11a38" - } - ], - "/explore-docs/nerdstorage": [ + "id": "5f24aa60196a67ede394f5f3" + }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "published_at": "2020-10-01T01:54:33Z", - "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-09-30T07:36:03Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 308.20465, + "_score": 95.03902, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add, query, and mutate data using NerdStorage", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + "title": "Data requirements and limits for custom event data", + "sections": "Additional Event API requirements", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "59f4354f4bb81c2ea8b80d0a" }, { + "category_2": "Java agent release notes", + "nodeid": 36271, "sections": [ - "Add, query, and mutate data using NerdStorage", - "Before you begin", - "Get started", - "Add data to NerdStorage", - "Query data from NerdStorage", - "Mutate data in NerdStorage", - "Delete collection from NerdStorage", - "Next steps" - ], - "title": "Add, query, and mutate data using NerdStorage", - "type": "developer", - "tags": [ - "add data", - "query data", - "mutate data", - "nerdstorage" + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 5.8.0", + "New features", + "New OSS SDK", + "Fixes" ], - "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", - "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", - "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-30T01:49:16Z", - "document_type": "page", - "popularity": 1, - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", + "title": "Java Agent 5.8.0", + "category_0": "Release notes", + "type": "docs", + "category_1": "APM agent release notes", + "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", + "published_at": "2020-09-30T16:19:57Z", + "updated_at": "2019-10-31T15:19:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 276.16418, + "_score": 74.71442, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add, query, and mutate data using NerdStorage", - "sections": "Add, query, and mutate data using NerdStorage", - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "tags": "nerdstorage", - "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" + "title": "Java Agent 5.8.0", + "sections": "APM agent release notes", + "category_1": "APM agent release notes", + "category_2": "Java agent release notes", + "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" }, - "id": "5efa98d4e7b9d26d6b7bab74" - }, + "id": "5dbafb88196a67d9b59aa23d" + } + ], + "/explore-docs/newrelic-cli": [ { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Intro to New Relic One API components", + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 196.81128, + "_score": 816.1435, "_version": null, "_explanation": null, - "sort": null, - "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5d6fe49a64441f8d6100a50f" }, { + "category_2": "Measure DevOps success", + "nodeid": 34966, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Automate instrumentation", + "Prerequisite", + "1. Make instrumentation part of every build", + "2. Take advantage of integrations and existing tools", + "3. Leverage the power of APIs", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", - "updated_at": "2020-08-14T01:47:12Z", + "title": "Automate instrumentation", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", + "published_at": "2020-09-30T16:47:41Z", + "updated_at": "2020-09-28T01:04:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 181.62546, + "_score": 770.04724, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI Reference", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "sections": "New Relic solutions", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5f5e0c14196a67e25fce6a8a" }, { "sections": [ @@ -3188,7 +2896,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3196,107 +2904,99 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.17038, + "_score": 593.96484, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, "id": "5efa989e28ccbc535a307dd0" - } - ], - "/explore-docs/nr1-nerdpack": [ + }, { "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic One CLI subscription commands", - "Command details", - "nr1 subscription:set", - "Subscribe to a Nerdpack", - "Usage", - "Options", - "Aliases", - "nr1 subscription:list", - "See your subscription", - "nr1 subscription:unset", - "Unsubscribe from a Nerdpack" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using the Kubernetes operator", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-01T01:55:36Z", - "title": "New Relic One CLI subscription commands", - "updated_at": "2020-08-06T01:44:54Z", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", "type": "developer", - "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 792.4389, + "_score": 567.46, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI subscription commands", - "sections": "New Relic One CLI subscription commands", - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" }, - "id": "5f2b6096e7b9d225ebc9de6f" + "id": "5efa999c196a67dfb4766445" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "title": "Quickly tag a set of resources", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 558.44434, + "_score": 506.2693, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + "sections": "Install the New Relic CLI", + "tags": "new relic CLI", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic" }, - "id": "5f28bd6ae7b9d267996ade94" - }, + "id": "5efa999d64441fa74a5f7e2d" + } + ], + "/explore-docs/nr1-common": [ { "sections": [ "New Relic One CLI reference", @@ -3319,7 +3019,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3327,7 +3027,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 303.64435, + "_score": 209.2349, "_version": null, "_explanation": null, "sort": null, @@ -3336,871 +3036,884 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic One CLI catalog commands", - "Command details", - "nr1 catalog:info", - "Get catalog details", - "Usage", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 151.96213, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + }, + "id": "5d6fe49a64441f8d6100a50f" + }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", "Options", - "nr1 catalog:submit", - "Send info to the catalog" + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 132.87393, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, + { + "sections": [ + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "published_at": "2020-10-01T01:55:36Z", - "title": "New Relic One CLI catalog commands", - "updated_at": "2020-08-14T01:49:24Z", + "title": "Set up your development environment", "type": "developer", - "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" + ], + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 160.93896, + "_score": 119.79255, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI catalog commands", - "sections": "New Relic One CLI catalog commands", - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5f28bd6a64441f805eb11a26" + "id": "5efa9973e7b9d242237bab39" }, { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using the Kubernetes operator", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.32285, + "_score": 114.98343, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" }, - "id": "5efa989e196a671300766404" + "id": "5efa999c196a67dfb4766445" } ], - "/build-apps/permission-manage-apps": [ + "/explore-docs/nerdstorage": [ { - "category_2": "Original users and roles", - "nodeid": 1101, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Original accounts and billing", - "Original product-based pricing", - "Original users and roles", - "SAML SSO (original users)", - "Original data retention", - "Original pricing plan usage", - "Users and roles (original user model)", - "View and manage users", - "User types: basic user and full user", - "Account roles", - "Add-on roles", - "Account permissions", - "Alert permissions", - "APM permissions", - "Browser permissions", - "Infrastructure permissions", - "Insights permissions", - "Mobile permissions", - "Synthetics permissions", - "Workloads", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Users and roles (original user model)", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Original accounts and billing", - "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", - "image": "", - "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", - "published_at": "2020-09-30T12:07:10Z", - "updated_at": "2020-09-24T08:31:54Z", - "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. The Owner can also install and configure the New Relic agent, and they can enable or set up features. Admins One or more individuals who can add, edit, and delete account users. Admins can also install and configure the New Relic agent, and they can enable or set up features. Users One or more individuals who use (and optionally set up) the available New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted Users One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Mobile. To allow a User or Restricted User to execute any of these functions in New Relic Mobile, assign a Mobile manager role. Admin and manager capabilities for Mobile include: Delete a mobile application from New Relic. Install New Relic Mobile for Android or iOS. Synthetics permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.7177, + "_score": 415.31677, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Account permissions", - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": " a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types" + "title": "Build apps", + "sections": "Add, query, and mutate data using NerdStorage", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "5f3e194028ccbc18c7f56de3" + "id": "5efa999d64441fc0f75f7e21" }, { - "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", - "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "About this Learncast", - "Prerequisites", - "Virtual Training Session List" + "Add, query, and mutate data using NerdStorage", + "Before you begin", + "Get started", + "Add data to NerdStorage", + "Query data from NerdStorage", + "Mutate data in NerdStorage", + "Delete collection from NerdStorage", + "Next steps" ], - "published_at": "2020-10-01T01:43:34Z", - "title": "Live Learncast: New Relic One Programmability", - "updated_at": "2020-07-31T01:40:49Z", - "type": "", - "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", + "title": "Add, query, and mutate data using NerdStorage", + "type": "developer", + "tags": [ + "add data", + "query data", + "mutate data", + "nerdstorage" + ], + "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", + "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", + "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", + "published_at": "2020-10-02T02:19:13Z", + "updated_at": "2020-08-30T01:49:16Z", + "document_type": "page", "popularity": 1, - "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", - "info": "", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.61203, + "_score": 266.03018, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" + "title": "Add, query, and mutate data using NerdStorage", + "sections": "Add, query, and mutate data using NerdStorage", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "tags": "nerdstorage", + "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" }, - "id": "5dc618cbe7b9d2a0a8e4649c" + "id": "5efa98d4e7b9d26d6b7bab74" }, { "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Serve, publish, and deploy your New Relic One app", + "title": "Intro to New Relic One API components", "type": "developer", "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-02T02:05:55Z", + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-02T02:19:13Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 79.6158, + "_score": 193.15755, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Add images and metadata to your apps", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Enable log monitoring", - "nodeid": 37836, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Forward your logs using the infrastructure agent", - "Enable log forwarding using the infrastructure agent", - "What you need", - "Install the infrastructure agent", - "Test log forwarding", - "Configure the infrastructure agent", - "Log forwarding parameters", - "name", - "attributes", - "file", - "systemd (Linux only)", - "syslog (Linux only)", - "tcp", - "max_line_kb", - "winlog", - "pattern", - "fluentbit", - "Sample configuration file", - "View your log data", - "Troubleshoot log forwarding", - "No data appears when tailing a file", - "No data appears when capturing via a Syslog socket", - "Send the agent's logs to New Relic", - "Runtime error on Windows", - "What's next?", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Forward your logs using the infrastructure agent", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "0c4cdf09d6bc7b6ada3301c6dfd7054a3e4190f9", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/amazonlinux.png", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/forward-your-logs-using-infrastructure-agent", - "published_at": "2020-09-30T14:27:50Z", - "updated_at": "2020-09-30T14:27:50Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "You can forward your logs to New Relic using the infrastructure agent.", - "body": "You can forward your logs to New Relic using our infrastructure agent. This makes all of your logging data available in one location, providing deeper visibility both into application and platform performance data. Enable log forwarding using the infrastructure agent To enable log forwarding through the infrastructure agent: Start by checking the what you need. Install the infrastructure agent, version 1.11.4 or higher. Configure your log sources and other parameters in the logging.d directory. Generate some traffic and wait a few minutes, then check your account for data. Explore your log data in the Logs UI. What you need The log forwarding feature is compatible with the following operating systems: Operating system Supported version Amazon Linux Amazon Linux 2 CentOS Version 7 or higher Debian Version 9 (\"Stretch\") or higher Red Hat Enterprise Linux (RHEL) Version 7 or higher SUSE Linux Enterprise Server (SLES) Version 12 Ubuntu Versions 16.04.x and 18.04.x (LTS versions) Windows Windows Server 2012, 2016, and 2019, and their service packs. Windows 10 To use the log forwarder of the infrastructure agent, make sure you meet the following requirements: Infrastructure agent version 1.11.4 or higher Windows: Install the Microsoft Visual C++ Redistributable: x64 or x86. The log forwarding feature is not yet supported on containerized agents. Install the infrastructure agent Starting with version 1.11.4, the infrastructure agent can forward logs to New Relic. To install and run the agent, use a package manager (Linux) or the MSI installer (Windows). Amazon Linux CentOS Container (Docker) Debian RHEL SLES Ubuntu Windows To use the links above, you must be logged to your New Relic account. If you don't have a New Relic account yet, or prefer to follow the procedure manually, see our tutorial. Test log forwarding To quickly check that the log forwarding feature works, follow these steps: Navigate to the logging forwarder configuration folder: Linux: /etc/newrelic-infra/logging.d/ Windows: C:\\Program Files\\New Relic\\newrelic-infra\\logging.d\\ Create a configuration file (for example, logs.yml) with this content: Linux example: # Remember to only use spaces for indentation logs: - name: \"test_log\" file: /var/log/test.log Windows example: # Remember to only use spaces for indentation logs: - name: \"test_log\" file: 'C:\\ProgramData\\New Relic\\newrelic-infra\\newrelic-infra.log' Run the following command to append a test log message to your log file: echo \"This is a test message.\" >> /PATH/TO/YOUR/LOG/FILE For example: echo \"This is a test message.\" >> /var/log/test.log Search New Relic Logs for test message. If you're running the infrastructure agent in privileged or non-privileged modes, make sure that the user executing nri-agent has read permissions for the data sources. Configure the infrastructure agent Configuration files describe which log sources are forwarded. You can add as many config files as you want, and set as many sources as you need per config file. To add a new configuration file for the log forwarding feature: Navigate to the logging forwarder configuration folder: Linux: /etc/newrelic-infra/logging.d/ Windows: C:\\Program Files\\New Relic\\newrelic-infra\\logging.d\\ Create a configuration file with the parameters you need. Use our sample config file as reference. The agent automatically processes new configuration files without having to restart it. Log forwarding parameters The log forwarder config supports the following parameters (for examples, see the sample configuration). name Name of the log or logs. attributes List of custom attributes, as key-value pairs, that can be used to send additional data with the logs which you can then query. For example, you can enable built-in parsing rules by setting the logtype attribute. Example: ... - name: tcp-simple-test tcp: uri: tcp://0.0.0.0:1234 format: none separator: \\t attributes: # You can add custom attributes to any source of logs tcpFormat: none logtype: nginx # See https://docs.newrelic.com/docs/logs/log-management/ui-data/new-relic-logs-parsing-built-rules-custom-parsing someOtherAttribute: associatedValue file Path to the log file or files. The agent tracks changes on the log files in a way similar to tail -f shell. Your file can point to a specific log file or multiple ones by using wildcards applied to names and extensions; for example, /logs/*.log Example: logs: - name: file-with-attributes file: /var/log/test.log # Path to a single file or pattern pattern: Error # Regular expression to filter log entries Wildcards can also be used in place of directories in a file path, which can be used to tail files located in different directories. Example: logs: - name: docker-logs file: /var/lib/docker/containers/*/*.log # Path to multiple folders and files pattern: redis # Regular expression to filter log entries Use of wildcards may significantly increase the number of file descriptors the Fluent Bit process keeps open, which can interfere with log collection if the host's file descriptor limit is reached. We recommend increasing the file descriptor limit on Linux hosts running Fluent Bit by adding the following to the host's /etc/security/limits.conf file: root soft nofile 65536 root hard nofile 65536 *soft nofile 65536 *hard nofile 65536 Once you add the changes above, reboot the host to ensure your changes are applied. systemd (Linux only) Service name. Once the systemd input is activated, log messages are collected from the journald daemon in Linux environments. Example: logs: - name: systemd-example systemd: cupsd This input type requires the agent to run in root mode. syslog (Linux only) Syslog data source. Parameters: uri: Syslog socket. Format varies depending on the protocol: TCP/UDP network sockets: [tcp/udp]://LISTEN_ADDRESS:PORT Unix domain sockets: unix_[tcp/udp]:// + /socket/path parser: Syslog parser. Default is rfc3164. Use rfc5424 if your messages include fractional seconds. Note: rfc3164 currently does not work on SuSE. unix_permissions: default is 0644 for domain sockets; this limits entries to processes running as root. You can use 0666 to listen for non-root processes, at your own risk. When running the agent in privileged mode, ports and sockets must be available or owned by nri-agent, with 0666 file permissions, so that other processes can write logs to the sockets. logs: # TCP network socket - name: syslog-tcp-test syslog: uri: tcp://0.0.0.0:5140 # Use the tcp://LISTEN_ADDRESS:PORT format parser: rfc5424 # Default syslog parser is rfc3164 # UDP network socket - name: syslog-udp-test syslog: uri: udp://0.0.0.0:6140 # Use the udp://LISTEN_ADDRESS:PORT format max_line_kb: 35 # Unix TCP domain socket - name: syslog-unix-tcp-test syslog: uri: unix_tcp:///var/unix-tcp-socket-test unix_permissions: 0666 # Default is 0644. Change at your own risk # Unix UDP domain socket - name: syslog-unix-udp-test syslog: uri: unix_udp:///var/unix-udp-socket-test parser: rfc5424 tcp Logs retrieved over TCP connections. Parameters: uri: TCP/IP socket to listen for incoming data. The URI format is tcp://LISTEN_ADDRESS:PORT format: format of the data. It can be json or none. separator: If format: none is used, you can define a separator string for splitting records (default: \\n). logs: - name: tcp-simple-test tcp: uri: tcp://0.0.0.0:1234 # Use the tcp://LISTEN_ADDRESS:PORT format format: none # Raw text - this is default for 'tcp' separator: \\t # String for separating raw text entries max_line_kb: 32 - name: tcp-json-test tcp: uri: tcp://0.0.0.0:2345 # Use the tcp://LISTEN_ADDRESS:PORT format format: json max_line_kb Maximum size of log entries/lines in KB. If log entries exceed the limit, they are skipped. Default is 128. winlog Collect events from Windows log channels. Parameters: channel: name of the channel logs will be collected from. collect-eventids: a list of Windows Event IDs to be collected and forwarded to New Relic. Event ID ranges are supported. exclude-eventids: a list of Windows Event IDs to be excluded from collection. Event ID ranges are supported. All events are collected from the specified channel by default. Configure the collect-eventids and exclude-eventids sections to avoid sending unwanted logs to your New Relic account. Add event IDs or ranges to collect-eventids or exclude-eventids to forward or drop specific events. exclude-eventids takes precedence over collect-eventids if the same event ID is present in both sections. Example: logs: - name: windows-security winlog: channel: Security collect-eventids: - 4624 - 4265 - 4700-4800 exclude-eventids: - 4735 pattern Regular expression for filtering records. Only supported for the tail, systemd, syslog and tcp (only with format none) sources. This field works in a way similar to grep -E in Unix systems. For example, for a given file being captured, you can filter for records containing either WARN or ERROR using: - name: only-records-with-warn-and-error file: /var/log/logFile.log pattern: WARN|ERROR No filtering is applied by default. fluentbit External Fluent Bit configuration and parser files. If defined, they are merged with the existing configuration and parser files generated by the Infrastructure agent. Parameters: config_file: path to an existing Fluent Bit configuration file. Note that any overlapping source results in duplicate messages in New Relic Logs. parsers_file: path to an existing Fluent Bit parsers file. The following parser names are reserved: rfc3164, rfc3164-local and rfc5424. Sample configuration file Here is an example of a logging.d/ configuration file in YAML format. For more configuration examples, see the infrastructure agent repository. logging.d/sample.yaml # Remember to only use spaces for indentation logs: # Example of 'file' source - name: file-with-attributes file: /var/log/test.log # Path to a single file or pattern attributes: # You can use custom attributes to enrich your data logtype: nginx team: The A Team pattern: Error # Regular expression to filter log entries # Example of 'systemd' source (Linux only) - name: systemd-example systemd: cupsd # Examples of 'syslog' source, one per protocol # TCP network socket - name: syslog-tcp-test syslog: uri: tcp://0.0.0.0:5140 # Use the tcp://LISTEN_ADDRESS:PORT format parser: rfc5424 # Default syslog parser is rfc3164 # UDP network socket - name: syslog-udp-test syslog: uri: udp://0.0.0.0:6140 # Use the udp://LISTEN_ADDRESS:PORT format max_line_kb: 35 # Paths for Unix sockets are defined by combining protocol and path: # unix_udp:// + /path/socket - for example, unix_udp:///tmp/socket # Unix TCP domain socket - name: syslog-unix-tcp-test syslog: uri: unix_tcp:///var/unix-tcp-socket-test unix_permissions: 0666 # Default is 0644. Change at your own risk # Unix UDP domain socket - name: syslog-unix-udp-test syslog: uri: unix_udp:///var/unix-udp-socket-test parser: rfc5424 # Examples of 'tcp' source for formats 'none' and 'json' - name: tcp-simple-test tcp: uri: tcp://0.0.0.0:1234 # Use the tcp://LISTEN_ADDRESS:PORT format format: none # Raw text - this is default for 'tcp' separator: \\t # String for separating raw text entries attributes: # You can add custom attributes to any source of logs tcpFormat: none someOtherAttribute: associatedValue max_line_kb: 32 - name: tcp-json-test tcp: uri: tcp://0.0.0.0:2345 # Use the tcp://LISTEN_ADDRESS:PORT format format: json attributes: tcpFormat: json yetAnotherAttribute: 12345 # Example of Fluent Bit configuration import - name: fluentbit-import fluentbit: config_file: /path/to/fluentbit.config parsers_file: /path/to/fluentbit/parsers.conf View your log data If everything is configured correctly and data is being collected, you should see data in both of these places: New Relic Logs UI New Relic tools for running NRQL queries; for example, you can execute a query like this: SELECT * FROM Log Troubleshoot log forwarding No data appears when tailing a file The log forwarding feature requires that the agent has permission to read the data sources. When running the infrastructure agent in privileged or non-privileged modes, make sure that the log files you want to forward (and any intermediary directory in its path) are readable by the user running nri-agent. Example: checking file access under Linux Let's check whether the file /var/log/restrictedLogs/logFile.log can be monitored by the nri-agent user. In Linux, you can do a quick check with the namei command: sudo -u nri-agent namei -ml /var/log/restrictedLogs/logFile.log f: /var/log/restrictedLogs/logFile.log drwxr-xr-x root root / drwxr-xr-x root root var drwxrwxr-x root syslog log drwxr--r-- root root restrictedLogs logFile.log - No such file or directory The above command failed since the file is not visible to the nri-agent user. By inspecting the previous output, we can detect that the restrictedLogs directory is missing the execution flag for \"others\". We can fix this by executing: sudo chmod 755 /var/log/restrictedLogs And then check for file access again: # sudo -u nri-agent namei -ml /var/log/restrictedLogs/logFile.log f: /var/log/restrictedLogs/logFile.log drwxr-xr-x root root / drwxr-xr-x root root var drwxrwxr-x root syslog log drwxr-xr-x root root restrictedLogs -rw-r----- vagrant vagrant logFile.log The file is now visible to the nri-agent user. You must ensure that the file is also readable by the nri-agent user. To check this, you can use: # sudo -u nri-agent head /var/log/restrictedLogs/logFile.log head: cannot open '/var/log/restrictedLogs/logFile.log' for reading: Permission denied In the above example, the file is missing the read rights for the \"others\" group (that is, users other than vagrant and the vagrant user group). A possible fix would be to grant read permissions to \"others\", but the application might change these permissions upon restart. To avoid this, a better approach would be to add the nri-agent user to the vagrant user group. If no data appears after you enable log management, follow standard troubleshooting procedures. No data appears when capturing via a Syslog socket The log forwarding feature requires that the agent has permission to read the data sources. When running the Infrastructure agent in privileged or non-privileged modes: If you're using Unix domain socket files, make sure that the nri-agent user can access these files (please refer to the previous section) and that they have read and write permissions (666) so that other users than nri-agent can write to them. If you're using IP sockets, ensure that the port that you are using is not a system reserved one (like port 80, for example). If no data appears after you enable log management, follow standard log management troubleshooting procedures. Send the agent's logs to New Relic The infrastructure agent can be configured to send its own logs to New Relic. This can be useful for troubleshooting issues with log forwarding, the agent, or when contacting support. To forward the infrastructure agent logs to New Relic: Edit your newrelic-infra.yml file. Enable agent logging in troubleshooting mode by adding verbose: 3 Recommendation: Enable agent logging in JSON format to log_format: json. Restart the agent so that the new settings can be loaded. On Windows and systems that don't use systemd or where journald is inaccessible, verbose:3 causes the agent to write the logs on the disk. Revert to verbose:0 to prevent this. Runtime error on Windows One of the following error messages may appear when enabling log forwarding on Windows: The code execution cannot proceed because VCRUNTIME140.dll was not found. or: error=\"exit status 3221225781\" process=log-forwarder This is caused by a missing DLL. To solve the issue, install the Microsoft Visual C++ Redistributable: x64 or x86. What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 77.76698, + "_score": 175.7587, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Enable log management", - "category_0": "Log management", - "category_1": "Enable log management", - "body": " the agent, use a package manager (Linux) or the MSI installer (Windows). Amazon Linux CentOS Container (Docker) Debian RHEL SLES Ubuntu Windows To use the links above, you must be logged to your New Relic account. If you don't have a New Relic account yet, or prefer to follow the procedure manually" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI Reference", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f37d04064441f1cbaa0a5e6" + "id": "5efa989ee7b9d2024b7bab97" }, { - "image": "https://newrelic.com/dam/new-relic/opengraph/newrelic_og_image.png", - "url": "https://newrelic.com/resources/webinars/NR-One-Programmability-191126", "sections": [ - "During this session we will review the following topics:", - "Related Links", - "COMPANY", - "CONNECT", - "international" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "published_at": "2020-09-30T03:35:05Z", - "title": "New Relic One Programmability Online Training", - "updated_at": "2020-09-03T03:22:32Z", - "type": "storefront", - "external_id": "f583edb88ca2d2430ca297364eac839705311616", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-02T02:12:20Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", "popularity": 1, - "body": "logo-newrelic Search Products Pricing Solutions Help Center About New Relic for iOS or Android    New Relic Insights App for iOS Search icon Sign Up Log In Products New Relic One Platform Overview Telemetry Data Platform Full-Stack Observability Applied Intelligence Solutions By Topic DevOps Cloud Adoption Cloud Native Digital Customer Experience By Industry E-commerce and Retail Media Public Sector By Technology Amazon Web Services Pivotal Cloud Foundry Microsoft Azure Google Cloud Platform Kubernetes Help Center Learn Docs Build on New Relic Explore open source projects Training Get help Community forum Global technical support Expert services About Our Customers Over 17,000 customers love New Relic, from Fortune 500 enterprises to small businesses around the globe. Our Blog The latest news, tips, and insights from the world of New Relic and digital intelligence. Our Company About Us Leadership Meetups and Events Resources   Investor Relations Newsroom Partner Program Contact Us logo-newrelic Want to use our logo? There's a page for that, including instructions and different styles and formats. Sorry about grabbing your right-click. Just trying to be helpful. You can also go home. Back to top icon Video New Relic One Programmability Online Training 46:59   Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably. Prerequisites This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests JavaScript layouts   During this session we will review the following topics: Installation of New Relic CLI and Environment setup Familiarisation with New Relic One Application component model and lifecycle Advanced UI construction and data processing Individual self paced experimentation and Open Source example deployment Request a Demo Related Links Case Study La plus grande brasserie au monde se tourne vers New Relic pour que la bière continue de couler à flots dans l’ère numérique Webinar Introduction to Custom Apps on New Relic One eBook Understanding the 3 Phases of DevOps Maturity Article Black Friday Is Coming: Are Your Sites and Apps Ready? eBook DevOps – so geht es richtig : Best Practices zur Überwindung von Erfolgshindernissen eBook DevOps Done Right: Best Practices to Knock Down Barriers to Success eBook Creating a Framework for Digital Media Success Article 7 Requirements for Monitoring Cloud Apps and Infrastructure COMPANY Careers and Culture Partner Program Investor Relations NewRelic.org Suppliers Portal CONNECT Contact Us Request Demo Events international newrelic.co.jp (日本語) newrelic.fr (Français) newrelic.de (Deutsch) newrelic.co.kr (한국어) Terms of Service DMCA Policy Privacy Policy Cookie Policy UK Slavery Act of 2015 ©2008-20 New Relic, Inc. All rights reserved", - "info": "", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 75.97102, + "_score": 149.40025, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, - "id": "5ece92cb28ccbc3012c1356a" + "id": "5efa989e28ccbc535a307dd0" } ], - "/build-apps/add-nerdgraphquery-guide": [ + "/explore-docs/nr1-cli": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "published_at": "2020-10-01T01:54:33Z", - "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 550.9965, + "_score": 115.39819, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f28bd6a64441f9817b11a38" }, { "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Map page views by region in a custom app", + "title": "Intro to NerdStorage", "type": "developer", "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 393.2302, + "_score": 103.52965, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Query your browser data", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" }, - "id": "5efa993c196a67066b766469" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" + ], + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-02T02:19:13Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 69.22942, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" + }, + "id": "5efa989e28ccbc4071307de5" + }, + { + "sections": [ + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" + ], + "title": "Set up your development environment", + "type": "developer", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 340.0782, + "_score": 52.558174, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5efa9973e7b9d242237bab39" }, { - "category_2": "Alert conditions", - "nodeid": 9231, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-02T02:17:56Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 295.3188, + "_score": 48.360214, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Sum of query results (limited or intermittent data)", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "New Relic One CLI", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5f2d992528ccbc489d88dfc1" - }, + "id": "5efa989e196a671300766404" + } + ], + "/explore-docs/nr1-config": [ { - "category_2": "UI and data", - "nodeid": 38701, "sections": [ - "Log management", + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", "Get started", - "Enable Logs", - "UI and data", - "Log API", - "Troubleshooting", - "Drop data with drop filter rules", - "Why it matters", - "How drop filter rules work", - "Create drop filter rules", - "Types of drop filter rules", - "Drop log events", - "Drop attributes", - "Cautions when dropping data", - "Delete drop filter rules", - "For more help" + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Drop data with drop filter rules ", - "category_0": "Log management", - "type": "docs", - "category_1": "Log management ", - "external_id": "054102731b07bea12e6877a2314f4114139b1a72", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-logs-create-drop-filter.png", - "url": "https://docs.newrelic.com/docs/logs/log-management/ui-data/drop-data-drop-filter-rules", - "published_at": "2020-09-30T14:55:23Z", - "updated_at": "2020-09-24T10:19:45Z", - "breadcrumb": "Contents / Log management / Log management / UI and data", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-02T02:12:20Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Data retention information for New Relic's log management and logs in context.", - "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when deciding to drop data. The data you drop is not recoverable. Before using this feature, review Responsibilities and considerations. Why it matters Drop filter rules help you accomplish some very important goals: You lower costs by storing only logs relevant to your account. You protect privacy and security by removing personal identifiable information (PII). You reduce noise by removing irrelevant events and attributes. How drop filter rules work A drop filter rule matches data based on a query. When triggered, the drop filter rule removes the matching data from the ingestion pipeline before it is written to in NRDB. Since the data does not reach the backend, it cannot be queried: the data is gone and cannot be restored. During the ingestion process, log data can be parsed, transformed, or dropped before being stored. Create drop filter rules You must have admin permissions in New Relic to create and edit drop filters, or be a member of a role with create and edit permissions for Logging Parsing Rules. Drop filter rules can be created from one.newrelic.com > Logs using new or existing log queries. To create a new drop filter rule: Filter or query to the specific set of logs which contain the data to be dropped. Once the query is active, click on the + button to show the query options and select Create a new drop filter. You can choose to either drop the entire log event that matches the query or just a specific subset of attributes in the matching events. Save the drop filter rule. Before saving the rule, consider changing its name. Once a drop filter rule is active, it's applied to all log events ingested from that point onwards. Rules are not applied retroactively: logs collected prior to the creation of a rule are not filtered by that rule. Types of drop filter rules Drop log events The default type of drop filter rule is to drop logs. This option drops the entire log events that match the filter query. When creating a rule try to provide a specific query that only matches log data which should be dropped. New Relic won't let you create drop filter rules without values in the matching query: this prevents badly formed rules from dropping all log data. Drop attributes You can specify attributes to be dropped in a log event that matches your query. At least one or more attributes must be selected. Any attribute which is selected will be dropped; all remaining attributes will be kept and stored in NRDB. We recommend this method for removing fields which could contain personal identifiable information (PII) or other sensitive attributes without losing valuable monitoring data. ​ Cautions when dropping data When creating drop rules, you are responsible for ensuring that the rules accurately identify and discard the data that meets the conditions that you have established. You are also responsible for monitoring the rule, as well as the data you disclose to New Relic. New Relic cannot guarantee that this functionality will completely resolve data disclosure concerns you may have. New Relic does not review or monitor how effective the rules you develop are. Creating rules about sensitive data can leak information about what kinds of data you maintain, including the format of your data or systems (for example, through referencing email addresses or specific credit card numbers). Rules you create, including all information in those rules, can be viewed and edited by any user with the relevant role-based access control permissions. Delete drop filter rules Drop filter rules can be deleted from one.newrelic.com > Logs. To delete a drop filter rule: Click on the + button to show the query options and select View all drop filters. Click the delete [trash icon] icon next to the drop filter rule you want to remove. Once deleted, rules no longer filter ingested log events. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 284.91223, + "_score": 246.60938, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Drop data with drop filter rules ", - "sections": "Drop data with drop filter rules", - "info": "Data retention information for New Relic's log management and logs in context.", - "category_2": "UI and data", - "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when", - "breadcrumb": "Contents / Log management / Log management / UI and data" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, - "id": "5f37d6fb196a67021c55e5eb" - } - ], - "/automate-workflows/get-started-terraform": [ + "id": "5efa989e28ccbc535a307dd0" + }, { - "category_2": "Using monitors", - "nodeid": 6371, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Alerts for synthetic monitoring", - "Add a synthetic monitor to alert policies", - "Existing monitor: Remove from alert policy", - "Receive alert notifications on a three-strike basis", - "Mute (disable) monitor's alert notifications", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Alerts for synthetic monitoring", - "category_0": "Synthetic monitoring", - "type": "docs", - "category_1": "Synthetic monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "published_at": "2020-09-30T10:59:40Z", - "updated_at": "2020-09-30T10:59:40Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 158.95908, + "_score": 155.54877, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Alerts for synthetic monitoring", - "sections": "Mute (disable) monitor's alert notifications", - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "category_0": "Synthetic monitoring", - "category_1": "Synthetic monitoring", - "category_2": "Using monitors", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "body": " and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f31b60e196a6742d2fbd6c8" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Measure DevOps success", - "nodeid": 16501, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Incident orchestration: Align teams, tools, processes", - "Prerequisites", - "1. Assign first responders to team dashboards", - "2. Determine incident thresholds for alert conditions", - "3. Ensure alerts have auditable notification channels", - "4. Automate triage and resolution steps", - "For more help" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Incident orchestration: Align teams, tools, processes", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", - "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", - "published_at": "2020-09-30T05:54:57Z", - "updated_at": "2020-09-28T00:43:51Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", - "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 125.78769, + "_score": 121.50067, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "3. Ensure alerts have auditable notification channels", - "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, - "id": "5f5b2113e7b9d2249dacfd34" + "id": "5f28bd6ae7b9d267996ade94" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32791, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Set proactive alerts and align teams, tools, and processes for incident response", - "Prerequisites", - "1. Define policies", - "2. Set specific alerts", - "3. Identify groups", - "4. Determine thresholds", - "5. Set notification channels", - "6. Automate resolution", - "7. Establish reviews", - "8. Fine-tune process", - "Expert tip", - "For more help" + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Set proactive alerts and align teams, tools, and processes for incident response ", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "6040cb4f86b1533eb31ac0e71e58709d77f79b50", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/proactive-baseline-alerts-devops_0.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/set-proactive-alerts-align-teams-tools-processes-incident-response", - "published_at": "2020-09-30T16:44:13Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "title": "Set up your development environment", + "type": "developer", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" + ], + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Using New Relic's proactive alerting, you can spend less time firefighting and more time deploying significant changes to your product.", - "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.8566, + "_score": 115.75819, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "5. Set notification channels", - "body": " acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create" + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5f5ac17764441ff9d5e067ec" + "id": "5efa9973e7b9d242237bab39" }, { - "category_2": "Rules, limits, and glossary", - "nodeid": 8421, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Rules and limits for alerts", - "Permission levels", - "Limits", - "For more help" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "title": "Rules and limits for alerts", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "901afbed24b00ad4bc060e0f1fb57dff969bdd67", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/rules-limits-glossary/rules-limits-alerts", - "published_at": "2020-09-30T13:40:52Z", - "updated_at": "2020-09-27T14:48:04Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Rules, limits, and glossary", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", + "type": "developer", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "info": "Read about assorted technical rules and min/max limits for alerts functionality. ", - "body": "This document contains some technical rules and limits for alerts. Permission levels Permissions differ depending on whether you're on our original product-based pricing plan or our New Relic One pricing plan: New Relic One pricing plan See Users and roles. Original pricing plan For accounts on our original product-based pricing plan, the user role determines the Alerts features available: Owner and Admins can add, change, disable, and delete alert policies, conditions, and channels. Users and Restricted Users can only view alert policies and conditions and their settings. Any user role can acknowledge an incident or close a violation. Limits Sub-accounts do not inherit a master account's alert policies. You must create policies separately for all accounts and sub-accounts. The following rules apply both to the New Relic One user interface and to the REST API (v2). New Relic Alerts Minimum value Maximum value Alert policies: Alert policy name 1 character 64 characters Policies per account n/a 10000 policies Products per policy any New Relic product (APM, Mobile, Synthetics, etc.) any New Relic product Alert conditions: Condition name 1 character 64 characters Conditions per policy 0 conditions 500 conditions Infrastructure alert conditions 0 conditions 3700 conditions NRQL query conditions OR Web app response percentiles per account 0 conditions 4000 conditions Targets (product entities) per condition 1 target 1000 targets from 1 or more products Thresholds per condition 0 Warnings, 1 Critical 1 Warning, 1 Critical Alert violations: Duration for condition violation 5 minutes Exception: 1 minute for at least once conditions, because the violation could occur during the first minute (or any minute). 2 hours Violations per incident 1 violation 10,000 violations Violations beyond this limit will not be persisted. Violation Search API - Page Size 1 page (less than or equal to 25 violations) 1000 pages (25K violations) Only use the only-open parameter to retrieve all open violations. If you have more than 25K open violations and need to retrieve them via the REST API, please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.85448, + "_score": 109.99419, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Alert notifications", - "body": ", please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5f34470b28ccbc19cb88dfc3" - }, + "id": "5f28bd6a64441f9817b11a38" + } + ], + "/explore-docs/nr1-nerdpack": [ { - "category_2": "Alert notifications", - "nodeid": 6491, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Test alert notification channels", - "Request the test", - "Troubleshoot the test results", - "For more help" + "New Relic One CLI subscription commands", + "Command details", + "nr1 subscription:set", + "Subscribe to a Nerdpack", + "Usage", + "Options", + "Aliases", + "nr1 subscription:list", + "See your subscription", + "nr1 subscription:unset", + "Unsubscribe from a Nerdpack" ], - "title": "Test alert notification channels", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", - "published_at": "2020-09-30T10:06:26Z", - "updated_at": "2020-08-11T04:16:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI subscription commands", + "updated_at": "2020-08-06T01:44:54Z", + "type": "developer", + "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", "document_type": "page", "popularity": 1, - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.526375, + "_score": 784.3516, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Test alert notification channels", - "sections": "Test alert notification channels", - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "category_2": "Alert notifications", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" + "title": "New Relic One CLI subscription commands", + "sections": "New Relic One CLI subscription commands", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" }, - "id": "5f2dbb3664441fd3a556a97c" - } - ], - "/explore-docs/nerdpack-file-structure": [ + "id": "5f2b6096e7b9d225ebc9de6f" + }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Create a \"Hello, World!\" application", - "Before you begin", - "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Create a \"Hello, World!\" application", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" - ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-01T01:54:34Z", - "updated_at": "2020-08-21T01:45:19Z", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 424.7649, + "_score": 552.89276, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "Nerdpack file structure", - "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" }, - "id": "5efa9973196a67d16d76645c" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ @@ -4224,7 +3937,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -4232,613 +3945,575 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 352.4895, + "_score": 296.20563, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" }, "id": "5efa989e28ccbc535a307dd0" }, - { - "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" - ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 312.13632, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Import additional modules from New Relic One", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" - }, - "id": "5efa993c196a67066b766469" - }, { "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", "sections": [ - "New Relic One CLI common commands", + "New Relic One CLI catalog commands", "Command details", - "nr1 help", - "See commands and get details", + "nr1 catalog:info", + "Get catalog details", "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "nr1 catalog:submit", + "Send info to the catalog" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "published_at": "2020-10-02T02:13:49Z", + "title": "New Relic One CLI catalog commands", + "updated_at": "2020-08-14T01:49:24Z", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 289.20245, + "_score": 158.6465, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" + "title": "New Relic One CLI catalog commands", + "sections": "New Relic One CLI catalog commands", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5f28bd6a64441f805eb11a26" }, { "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "title": "Set up your development environment", + "title": "Nerdpack file structure", "type": "developer", "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-01T01:54:33Z", - "updated_at": "2020-08-26T01:47:20Z", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-02T02:17:56Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 284.91898, + "_score": 150.53485, "_version": null, "_explanation": null, "sort": null, "highlight": { + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", "tags": "New Relic One CLI", - "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5efa989e196a671300766404" } ], - "/collect-data/custom-events": [ + "/collect-data/get-started-nerdgraph-api-explorer": [ { - "category_2": "Custom events", - "nodeid": 13661, + "category_2": "Examples", + "nodeid": 39021, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", + "NerdGraph", + "Get started", + "Examples", + "Use NerdGraph to manage license keys and personal API keys", + "Feature description", + "Create keys", + "Update keys", + "Delete keys", + "Query keys", "For more help" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", + "title": "Use NerdGraph to manage license keys and personal API keys", + "category_0": "APIs", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "category_1": "NerdGraph", + "external_id": "f4b228fbc3fdc408adc6d7e10a93edd0464b7762", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/use-nerdgraph-manage-license-keys-personal-api-keys", + "published_at": "2020-09-30T09:44:44Z", + "updated_at": "2020-09-24T10:26:23Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic NerdGraph (our GraphQL API) to create and manage your New Relic license keys, browser license keys, and personal API keys. ", + "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 228.68002, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Use NerdGraph to manage license keys and personal API keys", + "sections": "NerdGraph", + "info": "Use New Relic NerdGraph (our GraphQL API) to create and manage your New Relic license keys, browser license keys, and personal API keys. ", + "category_1": "NerdGraph", + "body": ". Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details", + "breadcrumb": "Contents / APIs / NerdGraph / Examples" + }, + "id": "5efe0487196a6710b1766452" + }, + { + "image": "", + "url": "https://developer.newrelic.com/collect-data/", + "sections": [ + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" + ], + "published_at": "2020-10-02T02:15:06Z", + "title": "Collect data", + "updated_at": "2020-10-02T02:15:06Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "document_type": "page", + "popularity": 1, + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.987564, + "_score": 153.58588, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "sections": "Build queries with NerdGraph", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa997328ccbc768c307de2" }, { - "category_2": "Logs in context with agent APIs", - "nodeid": 36921, + "nodeid": 37751, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Annotate logs for logs in context using APM agent APIs", - "APM agent trace metadata and linking metadata APIs", - "Resources for correctly annotating logs", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "NerdGraph API: Examples", + "Alerts features you can manage with NerdGraph", + "NerdGraph API explorer", + "Queries", + "Mutations", "For more help" ], - "title": "Annotate logs for logs in context using APM agent APIs", - "category_0": "Log management", + "title": "NerdGraph API: Examples ", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Enable log management", - "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-27T21:36:25Z", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", + "category_1": "New Relic Alerts", + "external_id": "017d6c34d340b9bc035e91483d675915fa5252eb", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/alerts_query_0.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-examples", + "published_at": "2020-10-01T14:32:20Z", + "updated_at": "2020-08-11T04:59:00Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", "document_type": "page", "popularity": 1, - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how you can manage alerts conditions, policies, and muting rules using NerdGraph.", + "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.54895, + "_score": 153.16411, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Annotate logs for logs in context using APM agent APIs", - "sections": "Logs in context with agent APIs", - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "category_2": "Logs in context with agent APIs", - "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" + "title": "NerdGraph API: Examples ", + "sections": "Mutations", + "info": "Read about how you can manage alerts conditions, policies, and muting rules using NerdGraph.", + "body": " Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" }, - "id": "5f37535c196a67c8c055e5ff" + "id": "5f2dbad864441fd15456a9eb" }, { - "category_2": "Custom events", - "nodeid": 6256, + "category_2": "Examples", + "nodeid": 17141, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "APM: Report custom events", - "Data considerations", - "Record a custom event", - "Timestamps", - "Limits and restricted characters", - "Reserved words", + "NerdGraph", + "Get started", + "Examples", + "NerdGraph cloud integrations API tutorial", + "Requirements", + "Access the NerdGraph GraphiQL explorer", + "Query examples", + "Mutation examples", + "Enable an Amazon AWS integration", + "Change polling interval for Amazon AWS integration", + "Disable Amazon AWS integration", "For more help" ], - "title": "APM: Report custom events", - "category_0": "Insights", + "title": "NerdGraph cloud integrations API tutorial", + "category_0": "APIs", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", + "category_1": "NerdGraph", + "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", "image": "", - "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "published_at": "2020-09-30T10:58:45Z", - "updated_at": "2020-09-24T07:10:11Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", + "published_at": "2020-09-30T07:03:23Z", + "updated_at": "2020-08-10T23:22:01Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "New Relic APM: how to report custom events and attributes.", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 79.82938, + "_score": 120.70594, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "APM: Report custom events", - "sections": "Custom events", - "info": "New Relic APM: how to report custom events and attributes.", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "NerdGraph cloud integrations API tutorial", + "sections": "NerdGraph", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "category_1": "NerdGraph", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", + "breadcrumb": "Contents / APIs / NerdGraph / Examples" }, - "id": "5f480a5a64441f578bfdcdb1" + "id": "5d83537b28ccbc263a1b7bf7" }, { - "category_2": "Custom events", - "nodeid": 13806, + "nodeid": 37711, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "NerdGraph API: NRQL condition alerts", + "Steps to create a NRQL condition", + "NRQL static condition", + "NRQL baseline condition", + "NRQL outlier condition", + "Update a condition", + "Update mutations", + "List and filter NRQL conditions", + "Singular NRQL condition queries", + "Update the description", + "Delete conditions", "For more help" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "NerdGraph API: NRQL condition alerts ", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "category_1": "New Relic Alerts", + "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-09-30T06:47:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", + "published_at": "2020-09-30T12:24:16Z", + "updated_at": "2020-08-11T04:56:49Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 58.117706, + "_score": 119.38991, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Custom events", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "NerdGraph API: NRQL condition alerts ", + "sections": "Update mutations", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" - }, + "id": "5f2dee1128ccbc562e88dfc1" + } + ], + "/automate-workflows/get-started-terraform": [ { + "category_2": "Using monitors", + "nodeid": 6371, "sections": [ - "Collect data from any source", - "Agent APIs", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API", - "Log API" - ], - "title": "Collect data from any source", - "type": "developer", - "tags": [ - "Agent API", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API" + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Alerts for synthetic monitoring", + "Add a synthetic monitor to alert policies", + "Existing monitor: Remove from alert policy", + "Receive alert notifications on a three-strike basis", + "Mute (disable) monitor's alert notifications", + "For more help" ], - "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", - "image": "", - "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-08-14T01:45:09Z", + "title": "Alerts for synthetic monitoring", + "category_0": "Synthetic monitoring", + "type": "docs", + "category_1": "Synthetic monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", + "image": "", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "published_at": "2020-09-30T10:59:40Z", + "updated_at": "2020-09-30T10:59:40Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", "document_type": "page", "popularity": 1, - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 54.824837, + "_score": 150.013, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Agent APIs", - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "tags": "Agent API", - "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" + "title": "Alerts for synthetic monitoring", + "sections": "Mute (disable) monitor's alert notifications", + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "category_0": "Synthetic monitoring", + "category_1": "Synthetic monitoring", + "category_2": "Using monitors", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "body": " and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" }, - "id": "5efa997128ccbc3c9a307dfd" - } - ], - "/explore-docs/newrelic-cli": [ + "id": "5f31b60e196a6742d2fbd6c8" + }, { "category_2": "Measure DevOps success", - "nodeid": 34966, + "nodeid": 16501, "sections": [ "New Relic solutions", "Measure DevOps success", "Cloud adoption", "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", + "Incident orchestration: Align teams, tools, processes", + "Prerequisites", + "1. Assign first responders to team dashboards", + "2. Determine incident thresholds for alert conditions", + "3. Ensure alerts have auditable notification channels", + "4. Automate triage and resolution steps", "For more help" ], - "title": "Automate instrumentation", + "title": "Incident orchestration: Align teams, tools, processes", "category_0": "New Relic solutions", "type": "docs", "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-09-30T16:47:41Z", - "updated_at": "2020-09-28T01:04:02Z", + "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", + "image": "", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", + "published_at": "2020-09-30T05:54:57Z", + "updated_at": "2020-09-28T00:43:51Z", "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", + "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 819.3552, + "_score": 120.43599, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" + "sections": "3. Ensure alerts have auditable notification channels", + "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" }, - "id": "5f5e0c14196a67e25fce6a8a" + "id": "5f5b2113e7b9d2249dacfd34" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Optimize your cloud native environment", + "nodeid": 32791, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Set proactive alerts and align teams, tools, and processes for incident response", + "Prerequisites", + "1. Define policies", + "2. Set specific alerts", + "3. Identify groups", + "4. Determine thresholds", + "5. Set notification channels", + "6. Automate resolution", + "7. Establish reviews", + "8. Fine-tune process", + "Expert tip", + "For more help" ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Set proactive alerts and align teams, tools, and processes for incident response ", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "6040cb4f86b1533eb31ac0e71e58709d77f79b50", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/proactive-baseline-alerts-devops_0.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/set-proactive-alerts-align-teams-tools-processes-incident-response", + "published_at": "2020-09-30T16:44:13Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "Using New Relic's proactive alerting, you can spend less time firefighting and more time deploying significant changes to your product.", + "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 766.3325, + "_score": 91.155205, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "5. Set notification channels", + "body": " acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5f5ac17764441ff9d5e067ec" }, { - "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", - "url": "https://developer.newrelic.com/nerd-days/", - "sections": [ - "Nerd Days is a free 1-day event focused on building more perfect software", - "Register for Nerd Days 1.0", - "What’s is Nerd Days exactly…", - "Save the date & join us online", - "Additional Nerd Days Events", - "REGISTER FOR NERD DAYS | AMERICAS", - "Speaker line up", - "Aaron Soto", - "Caitlin Halla", - "David Shanker", - "Jeremy Cooper", - "Joel Worrall", - "John Vajda", - "Jon Thurman", - "Justin Eveland", - "Leon Chapman", - "Lindsy Farina", - "Talia Nassi", - "Thomas Martin", - "Tracks", - "Observability", - "Cloud migration", - "Open source", - "Devops journey", - "Fundamentals", - "Nerd Days AMER Agenda", - "DevOps journey", - "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", - "Instrumenting your service using agents", - "Increased Maturity with Full Stack Observability", - "Deploying an app on Kubernetes", - "Delivering SRE as a Service", - "Building applications on New Relic One", - "Exploring your data using NRQL", - "New Relic AI", - "Going Serverless: Chipping at the monolith", - "Logging for Modern Organizations", - "Grafana and Prometheus with TDP", - "Lunch with Lew", - "Custom Instrumentation", - "Exploring Data with NerdGraph", - "Tool Consolidation", - "Flex Integration - Build Your First Linux Configuration", - "Open Source powers the New Relic One Catalog", - "Alerts Best Practices", - "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", - "Kubernetes Observability", - "Measuring code pipelines", - "New Relic CLI Wizardry/ Reducing toil with Terraform", - "True availability using Synthetics", - "How Observability-Driven Development accelerates DevOps transformations", - "CFP Customer Session: Cloud fundamentals", - "Testing in Production", - "NerdStorageVault: ThirdParty Secrets", - "Closing + Swag", - "Engage with the developer community" - ], - "published_at": "2020-10-01T02:03:39Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:45:03Z", - "type": "developer", - "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", + "category_2": "Alert notifications", + "nodeid": 6491, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Test alert notification channels", + "Request the test", + "Troubleshoot the test results", + "For more help" + ], + "title": "Test alert notification channels", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", + "published_at": "2020-09-30T10:06:26Z", + "updated_at": "2020-08-11T04:16:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00 AM Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00 AM Instrumenting your service using agents Increased Maturity with Full Stack Observability Deploying an app on Kubernetes Delivering SRE as a Service Building applications on New Relic One 11:00 AM Exploring your data using NRQL New Relic AI Going Serverless: Chipping at the monolith Logging for Modern Organizations Grafana and Prometheus with TDP 12:00 PM Lunch with Lew Lew Cirne and Jemiah Sius 1:00 PM Custom Instrumentation Exploring Data with NerdGraph Tool Consolidation Flex Integration - Build Your First Linux Configuration Open Source powers the New Relic One Catalog 2:00 PM Alerts Best Practices The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Kubernetes Observability Measuring code pipelines New Relic CLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using Synthetics How Observability-Driven Development accelerates DevOps transformations CFP Customer Session: Cloud fundamentals Testing in Production NerdStorageVault: ThirdParty Secrets 4:00 PM Closing + Swag Jemiah Sius and Team Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", - "info": "", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 644.9543, + "_score": 87.484604, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic CLI Wizardry/ Reducing toil with Terraform", - "body": " the New Relic One Catalog 2:00 PM Alerts Best Practices The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Kubernetes Observability Measuring code pipelines New Relic CLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using" + "title": "Test alert notification channels", + "sections": "Test alert notification channels", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "category_2": "Alert notifications", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" }, - "id": "5f3dd5bf28ccbc2349f56e4e" + "id": "5f2dbb3664441fd3a556a97c" }, { + "category_2": "Rules, limits, and glossary", + "nodeid": 8421, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", + "New Relic Alerts", "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Rules and limits for alerts", + "Permission levels", + "Limits", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Rules and limits for alerts", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "901afbed24b00ad4bc060e0f1fb57dff969bdd67", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/rules-limits-glossary/rules-limits-alerts", + "published_at": "2020-09-30T13:40:52Z", + "updated_at": "2020-09-27T14:48:04Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Rules, limits, and glossary", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "Read about assorted technical rules and min/max limits for alerts functionality. ", + "body": "This document contains some technical rules and limits for alerts. Permission levels Permissions differ depending on whether you're on our original product-based pricing plan or our New Relic One pricing plan: New Relic One pricing plan See Users and roles. Original pricing plan For accounts on our original product-based pricing plan, the user role determines the Alerts features available: Owner and Admins can add, change, disable, and delete alert policies, conditions, and channels. Users and Restricted Users can only view alert policies and conditions and their settings. Any user role can acknowledge an incident or close a violation. Limits Sub-accounts do not inherit a master account's alert policies. You must create policies separately for all accounts and sub-accounts. The following rules apply both to the New Relic One user interface and to the REST API (v2). New Relic Alerts Minimum value Maximum value Alert policies: Alert policy name 1 character 64 characters Policies per account n/a 10000 policies Products per policy any New Relic product (APM, Mobile, Synthetics, etc.) any New Relic product Alert conditions: Condition name 1 character 64 characters Conditions per policy 0 conditions 500 conditions Infrastructure alert conditions 0 conditions 3700 conditions NRQL query conditions OR Web app response percentiles per account 0 conditions 4000 conditions Targets (product entities) per condition 1 target 1000 targets from 1 or more products Thresholds per condition 0 Warnings, 1 Critical 1 Warning, 1 Critical Alert violations: Duration for condition violation 5 minutes Exception: 1 minute for at least once conditions, because the violation could occur during the first minute (or any minute). 2 hours Violations per incident 1 violation 10,000 violations Violations beyond this limit will not be persisted. Violation Search API - Page Size 1 page (less than or equal to 25 violations) 1000 pages (25K violations) Only use the only-open parameter to retrieve all open violations. If you have more than 25K open violations and need to retrieve them via the REST API, please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 612.8459, + "_score": 84.44709, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "sections": "Alert notifications", + "body": ", please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out" }, - "id": "5efa989e28ccbc535a307dd0" - }, + "id": "5f34470b28ccbc19cb88dfc3" + } + ], + "/automate-workflows/kubernetes-helm-deployment": [ { "image": "", "url": "https://developer.newrelic.com/automate-workflows/", @@ -4852,199 +4527,283 @@ "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "published_at": "2020-10-02T02:19:13Z", + "title": "Automate workflows", + "updated_at": "2020-09-25T01:49:59Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 4384.2637, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "category_2": "Enable log monitoring", + "nodeid": 34166, + "sections": [ + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Kubernetes plugin for log forwarding", + "Requirements", + "Enable Kubernetes for logs management", + "View log data", + "What's next?", + "For more help" + ], + "title": "Kubernetes plugin for log forwarding", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", + "published_at": "2020-09-30T15:46:39Z", + "updated_at": "2020-09-27T16:17:57Z", + "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 595.20825, + "_score": 129.76558, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + "sections": "New Relic Logs", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" }, - "id": "5efa999c196a67dfb4766445" - } - ], - "/build-apps/howto-use-nrone-table-components": [ + "id": "5f37c1d064441f0d21a0a5e1" + }, { - "image": "", - "url": "https://developer.newrelic.com/components/table-header-cell/", + "category_2": "Private locations", + "nodeid": 23821, "sections": [ - "TableHeaderCell", - "Usage", - "Props" + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Install containerized private minions (CPMs)", + "General private minion features", + "Kubernetes-specific features", + "System requirements and compatibility", + "Private location key", + "Sandboxing and Docker dependencies", + "Install and update CPM versions", + "Start the CPM", + "Stop or delete the CPM", + "Show help and examples", + "Show license information", + "Configure CPM", + "Networks", + "Security, sandboxing, and running as non-root", + "Docker image repository", + "Additional considerations for CPM connection", + "For more help" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "TableHeaderCell", - "updated_at": "2020-08-03T04:46:36Z", - "type": "developer", - "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", + "title": "Install containerized private minions (CPMs)", + "category_0": "Synthetic monitoring", + "type": "docs", + "category_1": "Synthetic monitoring", + "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", + "published_at": "2020-09-30T17:09:10Z", + "updated_at": "2020-08-13T23:22:19Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", "document_type": "page", "popularity": 1, - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component.", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 527.07007, + "_score": 116.08255, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "TableHeaderCell", - "sections": "TableHeaderCell", - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component." + "sections": "Using monitors", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" }, - "id": "5efa9906196a67523e76646e" + "id": "5f31d981196a678103fbd731" }, { - "image": "", - "url": "https://developer.newrelic.com/components/table-row/", + "category_2": "Enable and configure", + "nodeid": 38171, "sections": [ - "TableRow", - "Usage", - "Props" + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Integrations: Enable distributed tracing", + "Step 1. Install the integration", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. (Infinite Tracing) Configure the integration", + "Step 4. View traces", + "For more help" ], - "published_at": "2020-10-01T01:54:33Z", - "title": "TableRow", - "updated_at": "2020-08-03T04:45:42Z", - "type": "developer", - "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", + "title": "Integrations: Enable distributed tracing", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", + "published_at": "2020-09-30T14:39:10Z", + "updated_at": "2020-09-30T14:39:10Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", "document_type": "page", "popularity": 1, - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component.", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 431.5422, + "_score": 113.06013, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "TableRow", - "sections": "TableRow", - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component." + "sections": "Step 2. (Infinite Tracing) Set up a trace observer", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" }, - "id": "5efa98d564441f93435f7e24" + "id": "5ea0617064441ff137912311" }, { "category_2": "Cloud adoption", - "nodeid": 16121, + "nodeid": 16176, "sections": [ "New Relic solutions", "Measure DevOps success", "Cloud adoption", "Optimize your cloud native environment", - "Create application baselines", - "1. Identify components", - "2. Determine compatibility", - "3. Deploy monitoring", - "4. Gather metrics", - "5. Set up Dashboards", - "Expert tips", + "Optimize your cloud spend", + "1. Deploy the New Relic Infrastructure agent", + "2. Create dashboard charts for cloud performance", + "3. Configure the Amazon AWS integration", + "4. Set up billing budgets in AWS", + "5. Add cloud spend and budget widgets to Insights dashboard", + "6. Create dashboards for every level of your organization", + "7. Set up alerts", "For more help" ], - "title": "Create application baselines", + "title": "Optimize your cloud spend", "category_0": "New Relic solutions", "type": "docs", "category_1": "New Relic solutions", - "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", - "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", - "published_at": "2020-09-30T04:42:24Z", - "updated_at": "2020-09-27T20:07:57Z", + "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", + "published_at": "2020-09-30T04:51:45Z", + "updated_at": "2020-09-27T22:50:50Z", "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 339.70355, + "_score": 108.18422, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create application baselines", - "sections": "1. Identify components", - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" + "sections": "New Relic solutions", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" }, - "id": "5ad48685c75d0766faa181bd" - }, + "id": "5f59fc5b196a672f27ce6a45" + } + ], + "/build-apps/permission-manage-apps": [ { + "category_2": "Original users and roles", + "nodeid": 1101, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "Original accounts and billing", + "Original product-based pricing", + "Original users and roles", + "SAML SSO (original users)", + "Original data retention", + "Original pricing plan usage", + "Users and roles (original user model)", + "View and manage users", + "User types: basic user and full user", + "Account roles", + "Add-on roles", + "Account permissions", + "Alert permissions", + "APM permissions", + "Browser permissions", + "Infrastructure permissions", + "Insights permissions", + "Mobile permissions", + "Synthetics permissions", + "Workloads", + "For more help" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Users and roles (original user model)", + "category_0": "New Relic accounts", + "type": "docs", + "category_1": "Original accounts and billing", + "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", + "published_at": "2020-09-30T12:07:10Z", + "updated_at": "2020-09-24T08:31:54Z", + "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. The Owner can also install and configure the New Relic agent, and they can enable or set up features. Admins One or more individuals who can add, edit, and delete account users. Admins can also install and configure the New Relic agent, and they can enable or set up features. Users One or more individuals who use (and optionally set up) the available New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted Users One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Mobile. To allow a User or Restricted User to execute any of these functions in New Relic Mobile, assign a Mobile manager role. Admin and manager capabilities for Mobile include: Delete a mobile application from New Relic. Install New Relic Mobile for Android or iOS. Synthetics permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 307.99503, + "_score": 118.63314, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Import the TableChart component", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" + "sections": "Account permissions", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": " a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types" }, - "id": "5efa993c196a67066b766469" + "id": "5f3e194028ccbc18c7f56de3" }, { "image": "", @@ -5055,270 +4814,140 @@ "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", - "Add, query, and mutate data using NerdStorage", "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-01T01:54:33Z", + "published_at": "2020-10-02T02:16:27Z", "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", + "updated_at": "2020-10-02T02:16:27Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 306.30048, + "_score": 93.26297, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "sections": "Permissions for managing applications", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" }, "id": "5efa999d64441fc0f75f7e21" - } - ], - "/automate-workflows/get-started-kubernetes": [ - { - "category_2": "Alert conditions", - "nodeid": 9231, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" - ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", - "document_type": "page", - "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.83852, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Create NRQL alert conditions", - "sections": "Create NRQL alert conditions", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" - }, - "id": "5f2d992528ccbc489d88dfc1" }, { - "category_2": "Alerts release notes", - "nodeid": 40776, + "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", + "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "Component: NRQL Conditions (Review Required)", - "Announcing : New Relic One Streaming Alerts", - "Please read the full announcement and FAQ here , and follow the links to enroll." + "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "About this Learncast", + "Prerequisites", + "Virtual Training Session List" ], - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "74ae41c7360962287ea605016bf7731035382166", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", - "published_at": "2020-09-30T09:07:43Z", - "updated_at": "2020-09-29T22:06:08Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "published_at": "2020-10-02T02:01:40Z", + "title": "Live Learncast: New Relic One Programmability", + "updated_at": "2020-07-31T01:40:49Z", + "type": "", + "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", "popularity": 1, - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", + "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 112.883255, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_2": "Alerts release notes", - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" - }, - "id": "5f735c6964441f8a6aeb7297" - }, - { - "category_2": "Alert conditions", - "nodeid": 7261, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Set thresholds for an alert condition", - "What is a threshold?", - "View and set thresholds", - "For more help" - ], - "title": "Set thresholds for an alert condition", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "published_at": "2020-09-30T13:34:48Z", - "updated_at": "2020-09-30T13:34:48Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", - "document_type": "page", - "popularity": 1, - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 106.77141, + "_score": 90.22455, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Set thresholds for an alert condition", - "sections": "Alert conditions", - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" }, - "id": "5f2d847c64441fc0a656a98a" + "id": "5dc618cbe7b9d2a0a8e4649c" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "published_at": "2020-10-01T01:54:34Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "tags": [ + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.16582, + "_score": 79.00232, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using the Kubernetes operator", - "body": " it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Add images and metadata to your apps", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa999de7b9d283e67bab8f" }, { - "category_2": "Understand and use data", - "nodeid": 37981, - "sections": [ - "Elastic Container Service integration", - "Get started", - "Install", - "Understand and use data", - "Troubleshooting", - "Recommended ECS alert conditions", - "Recommended alert conditions", - "For more help" + "image": "https://newrelic.com/dam/new-relic/opengraph/newrelic_og_image.png", + "url": "https://newrelic.com/resources/webinars/NR-One-Programmability-191126", + "sections": [ + "During this session we will review the following topics:", + "Related Links", + "COMPANY", + "CONNECT", + "international" ], - "title": "Recommended ECS alert conditions", - "category_0": "Integrations", - "type": "docs", - "category_1": "Elastic Container Service integration", - "external_id": "304f01e7a5c68e9ef4dc76782eb9ff6847854065", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/elastic-container-service-integration/understand-use-data/ecs-integration-recommended-alert-conditions", - "published_at": "2020-09-30T14:33:21Z", - "updated_at": "2020-08-06T00:29:40Z", - "breadcrumb": "Contents / Integrations / Elastic Container Service integration / Understand and use data", - "document_type": "page", + "published_at": "2020-09-30T03:35:05Z", + "title": "New Relic One Programmability Online Training", + "updated_at": "2020-09-03T03:22:32Z", + "type": "storefront", + "external_id": "f583edb88ca2d2430ca297364eac839705311616", "popularity": 1, - "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", - "body": "New Relic's ECS integration reports and displays performance data from your Amazon ECS environment. This document provides some recommended alert conditions for monitoring ECS performance. Recommended alert conditions Here are some recommended ECS alert conditions. To add these alerts, go to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80% for 5 minutes Restart count NRQL: FROM ContainerSample SELECT max(restartCount) - min(restartCount) Critical: > 5 for 5 minutes For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "logo-newrelic Search Products Pricing Solutions Help Center About New Relic for iOS or Android    New Relic Insights App for iOS Search icon Sign Up Log In Products New Relic One Platform Overview Telemetry Data Platform Full-Stack Observability Applied Intelligence Solutions By Topic DevOps Cloud Adoption Cloud Native Digital Customer Experience By Industry E-commerce and Retail Media Public Sector By Technology Amazon Web Services Pivotal Cloud Foundry Microsoft Azure Google Cloud Platform Kubernetes Help Center Learn Docs Build on New Relic Explore open source projects Training Get help Community forum Global technical support Expert services About Our Customers Over 17,000 customers love New Relic, from Fortune 500 enterprises to small businesses around the globe. Our Blog The latest news, tips, and insights from the world of New Relic and digital intelligence. Our Company About Us Leadership Meetups and Events Resources   Investor Relations Newsroom Partner Program Contact Us logo-newrelic Want to use our logo? There's a page for that, including instructions and different styles and formats. Sorry about grabbing your right-click. Just trying to be helpful. You can also go home. Back to top icon Video New Relic One Programmability Online Training 46:59   Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably. Prerequisites This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests JavaScript layouts   During this session we will review the following topics: Installation of New Relic CLI and Environment setup Familiarisation with New Relic One Application component model and lifecycle Advanced UI construction and data processing Individual self paced experimentation and Open Source example deployment Request a Demo Related Links Case Study La plus grande brasserie au monde se tourne vers New Relic pour que la bière continue de couler à flots dans l’ère numérique Webinar Introduction to Custom Apps on New Relic One eBook Understanding the 3 Phases of DevOps Maturity Article Black Friday Is Coming: Are Your Sites and Apps Ready? eBook DevOps – so geht es richtig : Best Practices zur Überwindung von Erfolgshindernissen eBook DevOps Done Right: Best Practices to Knock Down Barriers to Success eBook Creating a Framework for Digital Media Success Article 7 Requirements for Monitoring Cloud Apps and Infrastructure COMPANY Careers and Culture Partner Program Investor Relations NewRelic.org Suppliers Portal CONNECT Contact Us Request Demo Events international newrelic.co.jp (日本語) newrelic.fr (Français) newrelic.de (Deutsch) newrelic.co.kr (한국어) Terms of Service DMCA Policy Privacy Policy Cookie Policy UK Slavery Act of 2015 ©2008-20 New Relic, Inc. All rights reserved", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 60.799225, + "_score": 75.32549, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Recommended ECS alert conditions", - "sections": "Recommended ECS alert conditions", - "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", - "body": " to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80" + "body": "; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure" }, - "id": "5ee05e9e28ccbcef4f4c8dda" + "id": "5ece92cb28ccbc3012c1356a" } ], "/build-apps/build-hello-world-app": [ @@ -5344,7 +4973,7 @@ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-01T01:55:36Z", + "published_at": "2020-10-02T02:19:13Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -5352,7 +4981,7 @@ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 198.72672, + "_score": 197.56372, "_version": null, "_explanation": null, "sort": null, @@ -5388,7 +5017,7 @@ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-01T01:55:36Z", + "published_at": "2020-10-02T02:17:56Z", "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, @@ -5396,7 +5025,7 @@ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 184.99704, + "_score": 183.74179, "_version": null, "_explanation": null, "sort": null, @@ -5433,7 +5062,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:10:51Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5444,7 +5073,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 157.66064, + "_score": 156.30869, "_version": null, "_explanation": null, "sort": null, @@ -5496,288 +5125,62 @@ ], "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-01T01:52:42Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 142.35085, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Create and serve a new Nerdpack", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" - }, - "id": "5efa993c196a67066b766469" - }, - { - "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" - ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" - ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-01T01:54:33Z", - "updated_at": "2020-09-02T02:04:41Z", - "document_type": "page", - "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.269, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "nerdpack manager", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" - }, - "id": "5f45bf2864441ffb4dfdcdbb" - } - ], - "/explore-docs/query-and-store-data": [ - { - "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-01T01:55:37Z", - "updated_at": "2020-09-08T01:50:19Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.53603, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "nerdstorage components", - "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" - }, - "id": "5efa989ee7b9d2048e7bab92" - }, - { - "category_2": "Java agent release notes", - "nodeid": 11976, - "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 3.36.0", - "Improvements", - "Fixes" - ], - "title": "Java Agent 3.36.0", - "category_0": "Release notes", - "type": "docs", - "category_1": "APM agent release notes", - "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", - "published_at": "2020-09-30T11:38:32Z", - "updated_at": "2018-04-14T23:39:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 47.740433, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" - }, - "id": "58a53cf38e9c0f755a81db4e" - }, - { - "category_2": "API guides", - "nodeid": 11521, - "sections": [ - "Java agent", - "Getting started", - "Installation", - "Additional installation", - "Heroku", - "Configuration", - "Attributes", - "Features", - "Instrumentation", - "Custom instrumentation", - "API guides", - "Async instrumentation", - "Troubleshooting", - "Guide to using the Java agent API", - "Use the API", - "Transactions", - "Instrument asynchronous work", - "Implement distributed tracing", - "Implement cross application tracing", - "Obtain references to New Relic entities", - "Additional API functionality", - "Additional API usage examples", - "For more help" - ], - "title": "Guide to using the Java agent API ", - "category_0": "APM agents", - "type": "docs", - "category_1": "Java agent", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "published_at": "2020-09-30T11:30:28Z", - "updated_at": "2020-09-03T11:06:02Z", - "breadcrumb": "Contents / APM agents / Java agent / API guides", - "document_type": "page", - "popularity": 1, - "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 33.79003, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" - }, - "id": "5a3137f4e621f4576cf1e35f" - }, - { - "category_2": "PHP agent API", - "nodeid": 11821, - "sections": [ - "PHP agent", - "Getting started", - "Installation", - "Advanced installation", - "Configuration", - "API guides", - "PHP agent API", - "Attributes", - "Features", - "Frameworks and libraries", - "Troubleshooting", - "newrelic_add_custom_tracer", - "Requirements", - "Description", - "Parameters", - "Return value(s)", - "Example(s)", - "Instrument a function", - "Instrument a method within a class", - "Instrument a method within a namespaced class", - "For more help" - ], - "title": "newrelic_add_custom_tracer (PHP agent API)", - "category_0": "APM agents", - "type": "docs", - "category_1": "PHP agent", - "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", - "published_at": "2020-09-30T11:16:38Z", - "updated_at": "2019-09-30T22:55:59Z", - "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", - "document_type": "api_doc", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-02T02:15:05Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", "popularity": 1, - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 26.681913, + "_score": 139.76091, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Instrument a method within a class", - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" + "sections": "Create and serve a new Nerdpack", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "58ca4191e621f45edd466e7a" + "id": "5efa993c196a67066b766469" }, { - "nodeid": 9691, "sections": [ - "Introduction to New Relic Mobile (Unity)", - "Contents", - "Monitor mobile app performance", - "Install and configure", - "Use Unity SDK API", - "Send custom events and attributes to Insights", - "Track custom network requests", - "Uninstall plugin", - "Unity release notes", - "For more help" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "Introduction to New Relic Mobile (Unity)", - "type": "docs", - "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", + "title": "Permissions for managing applications", + "type": "developer", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" + ], + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", "image": "", - "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", - "published_at": "2020-09-30T14:13:59Z", - "updated_at": "2020-07-25T00:44:01Z", - "breadcrumb": "Contents", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-02T02:13:50Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 17.589743, + "_score": 106.85573, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "nerdpack manager", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5c52cbec8e9c0f0b286080ec" + "id": "5f45bf2864441ffb4dfdcdbb" } ], "/build-apps/set-up-dev-env": [ @@ -5803,7 +5206,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -5811,7 +5214,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 250.27719, + "_score": 244.74277, "_version": null, "_explanation": null, "sort": null, @@ -5863,7 +5266,7 @@ "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 146.7058, + "_score": 136.3678, "_version": null, "_explanation": null, "sort": null, @@ -5911,7 +5314,7 @@ "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 141.1422, + "_score": 131.62956, "_version": null, "_explanation": null, "sort": null, @@ -5967,7 +5370,7 @@ "body": "New Relic offers a Fluent Bit output plugin to connect your Fluent Bit monitored log data to New Relic. Read on to learn how to enable this feature. Compatibility and requirements To use New Relic Logs with Fluent Bit, ensure your configuration meets the following requirements: New Relic license key (recommended) or Insert API key Fluent Bit 0.12 or higher is supported; however, version 1.0 or higher is recommended. Enable Fluent Bit for log management To forward your logs to New Relic using Fluent Bit: Install the Fluent Bit plugin. Configure the Fluent Bit plugin. Test the Fluent Bit plugin. Generate some traffic and wait a few minutes, then check your account for data. Recommended usage We have published a container with the plugin installed. It serves as a base image to be used by our Kubernetes integration. We recommend you use this base image and layer your own custom configuration files. Install the Fluent Bit plugin To install the Fluent Bit plugin: Navigate to New Relic's Fluent Bit plugin repository on GitHub. From the repository page, clone or download the repository. Run the following command to build your plugin: cd newrelic-fluent-bit-output && make all Configure the Fluent Bit plugin Fluent Bit needs to know the location of the New Relic plugin and the New Relic license key (recommended) or Insert API key to output data to New Relic. To configure your Fluent Bit plugin: Pay attention to white space when editing your config files. Be sure to use four spaces to indent and one space between keys and values. Locate or create a plugins.conf file in your plugins directory. In the plugins.conf file, add a reference to out_newrelic.so, adjacent to your fluent-bit.conf file: [PLUGINS] Path /PATH/TO/newrelic-fluent-bit-output/out_newrelic.so In the fluent-bit.conf file, add the following line under the service block: [SERVICE] # This is the main configuration block for fluent bit. # Ensure the follow line exists somewhere in the SERVICE block Plugins_File plugins.conf At the bottom of the fluent-bit.conf file, add the following to set up the input and output filters. Replace the placeholder text with your New Relic license key (recommended) or Insert API key: [INPUT] Name tail Path /PATH/TO/YOUR/LOG/FILE [OUTPUT] Name newrelic Match * licenseKey YOUR_LICENSE_KEY # Optional maxBufferSize 256000 maxRecords 1024 Restart your Fluent Bit instance with the following command: fluent-bit -c /PATH/TO/fluent-bit.conf Test the Fluent Bit plugin To test if your Fluent Bit plugin is receiving input from a log file: Run the following command to append a test log message to your log file: echo \"test message\" >> /PATH/TO/YOUR/LOG/FILE Search New Relic Logs UI for test message. Optional: Configure plugin attributes Plugin configuration Once you have installed and configured the Fluent Bit plugin, you can use the following attributes to configure how the plugin sends data to New Relic: Key Description licenseKey The New Relic license key. Use either licenseKey (recommended) or apiKey, not both. Default: none maxBufferSize The maximum size the payloads sent, in bytes. Default: 256000 maxRecords The maximum number of records to send at a time. Default: 1024 apiKey New Relic's Insert API key. Use either licenseKey (recommended) or apiKey, not both. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.49396, + "_score": 124.62242, "_version": null, "_explanation": null, "sort": null, @@ -5999,7 +5402,7 @@ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-01T01:55:36Z", + "published_at": "2020-10-02T02:16:28Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -6007,7 +5410,7 @@ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 126.41199, + "_score": 123.37394, "_version": null, "_explanation": null, "sort": null, @@ -6020,54 +5423,215 @@ "id": "5efa989ee7b9d2ad567bab51" } ], - "/collect-data/get-started-nerdgraph-api-explorer": [ + "/build-apps/add-nerdgraphquery-guide": [ { - "category_2": "Examples", - "nodeid": 39021, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "NerdGraph", + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 756.25995, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" + }, + "id": "5efa999d64441fc0f75f7e21" + }, + { + "sections": [ + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" + ], + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-02T02:15:05Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", + "popularity": 1, + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 382.0512, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Map page views by region in a custom app", + "sections": "Query your browser data", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + }, + "id": "5efa993c196a67066b766469" + }, + { + "category_2": "NRQL query tutorials", + "nodeid": 36916, + "sections": [ + "NRQL: New Relic Query Language", "Get started", - "Examples", - "Use NerdGraph to manage license keys and personal API keys", - "Feature description", - "Create keys", - "Update keys", - "Delete keys", - "Query keys", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", "For more help" ], - "title": "Use NerdGraph to manage license keys and personal API keys", - "category_0": "APIs", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", "type": "docs", - "category_1": "NerdGraph", - "external_id": "f4b228fbc3fdc408adc6d7e10a93edd0464b7762", - "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/use-nerdgraph-manage-license-keys-personal-api-keys", - "published_at": "2020-09-30T09:44:44Z", - "updated_at": "2020-09-24T10:26:23Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-09-30T16:27:58Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "Use New Relic NerdGraph (our GraphQL API) to create and manage your New Relic license keys, browser license keys, and personal API keys. ", - "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 238.20891, + "_score": 316.34402, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Use NerdGraph to manage license keys and personal API keys", - "sections": "NerdGraph", - "info": "Use New Relic NerdGraph (our GraphQL API) to create and manage your New Relic license keys, browser license keys, and personal API keys. ", - "category_1": "NerdGraph", - "body": ". Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details", - "breadcrumb": "Contents / APIs / NerdGraph / Examples" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + }, + "id": "5f2b1349196a67379343fbcf" + }, + { + "category_2": "UI and data", + "nodeid": 38701, + "sections": [ + "Log management", + "Get started", + "Enable Logs", + "UI and data", + "Log API", + "Troubleshooting", + "Drop data with drop filter rules", + "Why it matters", + "How drop filter rules work", + "Create drop filter rules", + "Types of drop filter rules", + "Drop log events", + "Drop attributes", + "Cautions when dropping data", + "Delete drop filter rules", + "For more help" + ], + "title": "Drop data with drop filter rules ", + "category_0": "Log management", + "type": "docs", + "category_1": "Log management ", + "external_id": "054102731b07bea12e6877a2314f4114139b1a72", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-logs-create-drop-filter.png", + "url": "https://docs.newrelic.com/docs/logs/log-management/ui-data/drop-data-drop-filter-rules", + "published_at": "2020-09-30T14:55:23Z", + "updated_at": "2020-09-24T10:19:45Z", + "breadcrumb": "Contents / Log management / Log management / UI and data", + "document_type": "page", + "popularity": 1, + "info": "Data retention information for New Relic's log management and logs in context.", + "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when deciding to drop data. The data you drop is not recoverable. Before using this feature, review Responsibilities and considerations. Why it matters Drop filter rules help you accomplish some very important goals: You lower costs by storing only logs relevant to your account. You protect privacy and security by removing personal identifiable information (PII). You reduce noise by removing irrelevant events and attributes. How drop filter rules work A drop filter rule matches data based on a query. When triggered, the drop filter rule removes the matching data from the ingestion pipeline before it is written to in NRDB. Since the data does not reach the backend, it cannot be queried: the data is gone and cannot be restored. During the ingestion process, log data can be parsed, transformed, or dropped before being stored. Create drop filter rules You must have admin permissions in New Relic to create and edit drop filters, or be a member of a role with create and edit permissions for Logging Parsing Rules. Drop filter rules can be created from one.newrelic.com > Logs using new or existing log queries. To create a new drop filter rule: Filter or query to the specific set of logs which contain the data to be dropped. Once the query is active, click on the + button to show the query options and select Create a new drop filter. You can choose to either drop the entire log event that matches the query or just a specific subset of attributes in the matching events. Save the drop filter rule. Before saving the rule, consider changing its name. Once a drop filter rule is active, it's applied to all log events ingested from that point onwards. Rules are not applied retroactively: logs collected prior to the creation of a rule are not filtered by that rule. Types of drop filter rules Drop log events The default type of drop filter rule is to drop logs. This option drops the entire log events that match the filter query. When creating a rule try to provide a specific query that only matches log data which should be dropped. New Relic won't let you create drop filter rules without values in the matching query: this prevents badly formed rules from dropping all log data. Drop attributes You can specify attributes to be dropped in a log event that matches your query. At least one or more attributes must be selected. Any attribute which is selected will be dropped; all remaining attributes will be kept and stored in NRDB. We recommend this method for removing fields which could contain personal identifiable information (PII) or other sensitive attributes without losing valuable monitoring data. ​ Cautions when dropping data When creating drop rules, you are responsible for ensuring that the rules accurately identify and discard the data that meets the conditions that you have established. You are also responsible for monitoring the rule, as well as the data you disclose to New Relic. New Relic cannot guarantee that this functionality will completely resolve data disclosure concerns you may have. New Relic does not review or monitor how effective the rules you develop are. Creating rules about sensitive data can leak information about what kinds of data you maintain, including the format of your data or systems (for example, through referencing email addresses or specific credit card numbers). Rules you create, including all information in those rules, can be viewed and edited by any user with the relevant role-based access control permissions. Delete drop filter rules Drop filter rules can be deleted from one.newrelic.com > Logs. To delete a drop filter rule: Click on the + button to show the query options and select View all drop filters. Click the delete [trash icon] icon next to the drop filter rule you want to remove. Once deleted, rules no longer filter ingested log events. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 274.55902, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Drop data with drop filter rules ", + "sections": "Drop data with drop filter rules", + "info": "Data retention information for New Relic's log management and logs in context.", + "category_2": "UI and data", + "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when", + "breadcrumb": "Contents / Log management / Log management / UI and data" }, - "id": "5efe0487196a6710b1766452" + "id": "5f37d6fb196a67021c55e5eb" }, { - "nodeid": 37751, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ "New Relic Alerts", "Get started", @@ -6080,270 +5644,332 @@ "Rules, limits, and glossary", "Alerts and Nerdgraph", "REST API alerts", - "NerdGraph API: Examples", - "Alerts features you can manage with NerdGraph", - "NerdGraph API explorer", - "Queries", - "Mutations", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "NerdGraph API: Examples ", + "title": "Create NRQL alert conditions", "category_0": "Alerts and Applied Intelligence", "type": "docs", "category_1": "New Relic Alerts", - "external_id": "017d6c34d340b9bc035e91483d675915fa5252eb", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/alerts_query_0.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-examples", - "published_at": "2020-10-01T14:32:20Z", - "updated_at": "2020-08-11T04:59:00Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-09-30T20:06:36Z", + "updated_at": "2020-09-30T20:06:35Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "Read about how you can manage alerts conditions, policies, and muting rules using NerdGraph.", - "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 154.98285, + "_score": 274.2721, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph API: Examples ", - "sections": "Mutations", - "info": "Read about how you can manage alerts conditions, policies, and muting rules using NerdGraph.", - "body": " Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" + "sections": "Sum of query results (limited or intermittent data)", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" }, - "id": "5f2dbad864441fd15456a9eb" - }, + "id": "5f2d992528ccbc489d88dfc1" + } + ], + "/explore-docs/query-and-store-data": [ { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Build queries with NerdGraph", - "Collect data - any source", - "Create custom events", - "Query data with NRQL" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "published_at": "2020-10-01T01:55:37Z", - "title": "Collect data", - "updated_at": "2020-09-30T01:47:01Z", + "title": "Intro to NerdStorage", "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 140.70593, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "tags": "nerdstorage components", + "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" + }, + "id": "5efa989ee7b9d2048e7bab92" + }, + { + "category_2": "Java agent release notes", + "nodeid": 11976, + "sections": [ + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 3.36.0", + "Improvements", + "Fixes" + ], + "title": "Java Agent 3.36.0", + "category_0": "Release notes", + "type": "docs", + "category_1": "APM agent release notes", + "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", + "published_at": "2020-09-30T11:38:32Z", + "updated_at": "2018-04-14T23:39:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.6011, + "_score": 47.135986, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Build queries with NerdGraph", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 10 min Query data with NRQL Query default data, custom events, and attributes" + "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" }, - "id": "5efa997328ccbc768c307de2" + "id": "58a53cf38e9c0f755a81db4e" }, { - "category_2": "Examples", - "nodeid": 17141, + "category_2": "API guides", + "nodeid": 11521, "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph cloud integrations API tutorial", - "Requirements", - "Access the NerdGraph GraphiQL explorer", - "Query examples", - "Mutation examples", - "Enable an Amazon AWS integration", - "Change polling interval for Amazon AWS integration", - "Disable Amazon AWS integration", + "Java agent", + "Getting started", + "Installation", + "Additional installation", + "Heroku", + "Configuration", + "Attributes", + "Features", + "Instrumentation", + "Custom instrumentation", + "API guides", + "Async instrumentation", + "Troubleshooting", + "Guide to using the Java agent API", + "Use the API", + "Transactions", + "Instrument asynchronous work", + "Implement distributed tracing", + "Implement cross application tracing", + "Obtain references to New Relic entities", + "Additional API functionality", + "Additional API usage examples", "For more help" ], - "title": "NerdGraph cloud integrations API tutorial", - "category_0": "APIs", + "title": "Guide to using the Java agent API ", + "category_0": "APM agents", "type": "docs", - "category_1": "NerdGraph", - "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", + "category_1": "Java agent", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", - "published_at": "2020-09-30T07:03:23Z", - "updated_at": "2020-08-10T23:22:01Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "published_at": "2020-09-30T11:30:28Z", + "updated_at": "2020-09-03T11:06:02Z", + "breadcrumb": "Contents / APM agents / Java agent / API guides", "document_type": "page", "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.81966, + "_score": 33.247032, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph cloud integrations API tutorial", - "sections": "NerdGraph", - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "category_1": "NerdGraph", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", - "breadcrumb": "Contents / APIs / NerdGraph / Examples" + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" }, - "id": "5d83537b28ccbc263a1b7bf7" + "id": "5a3137f4e621f4576cf1e35f" }, { - "nodeid": 37711, + "category_2": "PHP agent API", + "nodeid": 11821, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", + "PHP agent", + "Getting started", + "Installation", + "Advanced installation", + "Configuration", + "API guides", + "PHP agent API", + "Attributes", + "Features", + "Frameworks and libraries", "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "NerdGraph API: NRQL condition alerts", - "Steps to create a NRQL condition", - "NRQL static condition", - "NRQL baseline condition", - "NRQL outlier condition", - "Update a condition", - "Update mutations", - "List and filter NRQL conditions", - "Singular NRQL condition queries", - "Update the description", - "Delete conditions", + "newrelic_add_custom_tracer", + "Requirements", + "Description", + "Parameters", + "Return value(s)", + "Example(s)", + "Instrument a function", + "Instrument a method within a class", + "Instrument a method within a namespaced class", "For more help" ], - "title": "NerdGraph API: NRQL condition alerts ", - "category_0": "Alerts and Applied Intelligence", + "title": "newrelic_add_custom_tracer (PHP agent API)", + "category_0": "APM agents", "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", + "category_1": "PHP agent", + "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", - "published_at": "2020-09-30T12:24:16Z", - "updated_at": "2020-08-11T04:56:49Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", + "published_at": "2020-09-30T11:16:38Z", + "updated_at": "2019-09-30T22:55:59Z", + "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", + "document_type": "api_doc", "popularity": 1, - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.50064, + "_score": 26.395432, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph API: NRQL condition alerts ", - "sections": "Update mutations", - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" + "sections": "Instrument a method within a class", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" }, - "id": "5f2dee1128ccbc562e88dfc1" - } - ], - "/collect-data/collect-data-from-any-source": [ + "id": "58ca4191e621f45edd466e7a" + }, { - "category_2": "Ingest APIs", - "nodeid": 35471, + "nodeid": 9691, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Telemetry SDKs: Report custom telemetry data", - "Requirements and compatibility", - "Available libraries", - "Write your own Telemetry SDK or contribute to an existing one", - "Integrations built with the Telemetry SDKs", + "Introduction to New Relic Mobile (Unity)", + "Contents", + "Monitor mobile app performance", + "Install and configure", + "Use Unity SDK API", + "Send custom events and attributes to Insights", + "Track custom network requests", + "Uninstall plugin", + "Unity release notes", "For more help" ], - "title": "Telemetry SDKs: Report custom telemetry data", - "category_0": "Telemetry Data Platform", + "title": "Introduction to New Relic Mobile (Unity)", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", - "published_at": "2020-09-30T19:06:43Z", - "updated_at": "2020-09-17T14:37:52Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", + "published_at": "2020-09-30T14:13:59Z", + "updated_at": "2020-07-25T00:44:01Z", + "breadcrumb": "Contents", "document_type": "page", "popularity": 1, - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 171.89987, + "_score": 17.448376, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Telemetry SDKs: Report custom telemetry data", - "sections": "Telemetry SDKs: Report custom telemetry data", - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "category_0": "Telemetry Data Platform", - "category_2": "Ingest APIs", - "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" }, - "id": "5d89fefbe7b9d2537ed30dc1" - }, + "id": "5c52cbec8e9c0f0b286080ec" + } + ], + "/collect-data/query-data-nrql": [ { - "category_2": "Custom events", - "nodeid": 13806, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-09-30T06:47:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-09-30T20:06:36Z", + "updated_at": "2020-09-30T20:06:35Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 101.207886, + "_score": 151.73608, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Event data sources", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Create NRQL alert conditions", + "sections": "NRQL alert syntax", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5f2d992528ccbc489d88dfc1" }, { "category_2": "Custom events", @@ -6377,116 +6003,170 @@ "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 101.04441, + "_score": 130.47174, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Additional Event API requirements", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Data requirements and limits for custom event data", + "sections": "Event data sources", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, "id": "59f4354f4bb81c2ea8b80d0a" }, { "category_2": "Get started", - "nodeid": 36051, + "nodeid": 11431, "sections": [ - "Ingest and manage data", + "NRQL: New Relic Query Language", "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Get data into New Relic", - "New Relic-built agents and integrations", - "Agent APIs", - "Telemetry SDKs", - "APIs for sending metrics, traces, logs, and events", - "New Relic One applications", + "NRQL query tools", + "NRQL query tutorials", + "Introduction to NRQL, New Relic's query language", + "What is NRQL?", + "Where can you use NRQL?", + "What data can you query with NRQL?", + "Start using NRQL", + "NRQL query examples", + "NRQL syntax", "For more help" ], - "title": "Get data into New Relic", - "category_0": "Telemetry Data Platform", + "title": "Introduction to NRQL, New Relic's query language", + "category_0": "Query your data", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", - "published_at": "2020-09-30T16:13:27Z", - "updated_at": "2020-08-10T23:16:39Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "published_at": "2020-09-30T12:11:32Z", + "updated_at": "2020-09-24T08:40:20Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", + "document_type": "page", + "popularity": 1, + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 128.53244, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Introduction to NRQL, New Relic's query language", + "sections": "What data can you query with NRQL?", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + }, + "id": "5f2abd47196a67747343fbe1" + }, + { + "category_2": "NRQL query tutorials", + "nodeid": 36916, + "sections": [ + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", + "For more help" + ], + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-09-30T16:27:58Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "An introduction to how to get data into New Relic. ", - "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.91658, + "_score": 103.669556, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "APIs for sending metrics, traces, logs, and events", - "category_0": "Telemetry Data Platform", - "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5f24aa60196a67ede394f5f3" + "id": "5f2b1349196a67379343fbcf" }, { - "category_2": "Java agent release notes", - "nodeid": 36271, + "category_2": "Ingest APIs", + "nodeid": 35526, "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 5.8.0", - "New features", - "New OSS SDK", - "Fixes" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Metric API limits and restricted attributes", + "Endpoint requirements and maximum limits", + "Rate limit violations", + "Restricted attributes", + "For more help" ], - "title": "Java Agent 5.8.0", - "category_0": "Release notes", + "title": "Metric API limits and restricted attributes", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "APM agent release notes", - "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "category_1": "Ingest and manage data", + "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", - "published_at": "2020-09-30T16:19:57Z", - "updated_at": "2019-10-31T15:19:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", - "info": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", + "published_at": "2020-09-30T16:59:39Z", + "updated_at": "2020-09-27T21:34:10Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "document_type": "page", + "popularity": 1, + "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", + "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 50k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 50k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 75.06235, + "_score": 80.76111, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Java Agent 5.8.0", - "sections": "APM agent release notes", - "category_1": "APM agent release notes", - "category_2": "Java agent release notes", - "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" + "sections": "Ingest and manage data", + "category_0": "Telemetry Data Platform", + "category_1": "Ingest and manage data", + "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5dbafb88196a67d9b59aa23d" + "id": "5f24e4ede7b9d28743c8231c" } ], - "/explore-docs/nr1-catalog": [ + "/explore-docs/nr1-plugins": [ { "sections": [ "New Relic One CLI reference", @@ -6509,7 +6189,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6517,7 +6197,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 309.85535, + "_score": 244.5633, "_version": null, "_explanation": null, "sort": null, @@ -6526,50 +6206,43 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "published_at": "2020-10-01T01:45:23Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:36:50Z", + "title": "New Relic CLI Reference", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 13 Days : 21 Hours : 58 Minutes : 23 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 185.20657, + "_score": 132.87393, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989ee7b9d2024b7bab97" }, { "image": "", @@ -6595,7 +6268,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:10:51Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6606,7 +6279,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 171.31636, + "_score": 121.50067, "_version": null, "_explanation": null, "sort": null, @@ -6619,271 +6292,296 @@ "id": "5f28bd6ae7b9d267996ade94" }, { - "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", - "url": "https://developer.newrelic.com/nerd-days/", - "sections": [ - "Nerd Days is a free 1-day event focused on building more perfect software", - "Register for Nerd Days 1.0", - "What’s is Nerd Days exactly…", - "Save the date & join us online", - "Additional Nerd Days Events", - "REGISTER FOR NERD DAYS | AMERICAS", - "Speaker line up", - "Aaron Soto", - "Caitlin Halla", - "David Shanker", - "Jeremy Cooper", - "Joel Worrall", - "John Vajda", - "Jon Thurman", - "Justin Eveland", - "Leon Chapman", - "Lindsy Farina", - "Talia Nassi", - "Thomas Martin", - "Tracks", - "Observability", - "Cloud migration", - "Open source", - "Devops journey", - "Fundamentals", - "Nerd Days AMER Agenda", - "DevOps journey", - "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", - "Instrumenting your service using agents", - "Increased Maturity with Full Stack Observability", - "Deploying an app on Kubernetes", - "Delivering SRE as a Service", - "Building applications on New Relic One", - "Exploring your data using NRQL", - "New Relic AI", - "Going Serverless: Chipping at the monolith", - "Logging for Modern Organizations", - "Grafana and Prometheus with TDP", - "Lunch with Lew", - "Custom Instrumentation", - "Exploring Data with NerdGraph", - "Tool Consolidation", - "Flex Integration - Build Your First Linux Configuration", - "Open Source powers the New Relic One Catalog", - "Alerts Best Practices", - "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", - "Kubernetes Observability", - "Measuring code pipelines", - "New Relic CLI Wizardry/ Reducing toil with Terraform", - "True availability using Synthetics", - "How Observability-Driven Development accelerates DevOps transformations", - "CFP Customer Session: Cloud fundamentals", - "Testing in Production", - "NerdStorageVault: ThirdParty Secrets", - "Closing + Swag", - "Engage with the developer community" - ], - "published_at": "2020-10-01T02:03:39Z", - "title": "New Relic Developers", - "updated_at": "2020-09-30T01:45:03Z", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", + "sections": [ + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" + ], + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", "type": "developer", - "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00 AM Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00 AM Instrumenting your service using agents Increased Maturity with Full Stack Observability Deploying an app on Kubernetes Delivering SRE as a Service Building applications on New Relic One 11:00 AM Exploring your data using NRQL New Relic AI Going Serverless: Chipping at the monolith Logging for Modern Organizations Grafana and Prometheus with TDP 12:00 PM Lunch with Lew Lew Cirne and Jemiah Sius 1:00 PM Custom Instrumentation Exploring Data with NerdGraph Tool Consolidation Flex Integration - Build Your First Linux Configuration Open Source powers the New Relic One Catalog 2:00 PM Alerts Best Practices The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Kubernetes Observability Measuring code pipelines New Relic CLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using Synthetics How Observability-Driven Development accelerates DevOps transformations CFP Customer Session: Cloud fundamentals Testing in Production NerdStorageVault: ThirdParty Secrets 4:00 PM Closing + Swag Jemiah Sius and Team Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", - "info": "", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 156.72662, + "_score": 109.99419, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "Open Source powers the New Relic One Catalog", - "body": " the New Relic One Catalog 2:00 PM Alerts Best Practices The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Kubernetes Observability Measuring code pipelines New Relic CLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5f3dd5bf28ccbc2349f56e4e" + "id": "5f28bd6a64441f9817b11a38" }, { "sections": [ - "Serve, publish, and deploy your New Relic One app", + "Quickly tag a set of resources", "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "Next steps" ], - "title": "Serve, publish, and deploy your New Relic One app", + "title": "Quickly tag a set of resources", "type": "developer", "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "tags", + "new relic CLI" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-01T01:56:53Z", - "updated_at": "2020-09-02T02:05:55Z", + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 107.2319, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Install the New Relic CLI", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + }, + "id": "5efa999d64441fa74a5f7e2d" + } + ], + "/explore-docs/nerdpack-file-structure": [ + { + "sections": [ + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" + ], + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-21T01:45:19Z", + "document_type": "page", + "popularity": 1, + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.10922, + "_score": 421.19516, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "Nerdpack file structure", + "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" }, - "id": "5efa999de7b9d283e67bab8f" - } - ], - "/explore-docs/nr1-cli": [ + "id": "5efa9973196a67d16d76645c" + }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "published_at": "2020-10-01T01:56:53Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "title": "New Relic One CLI reference", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-02T02:12:20Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.2695, + "_score": 344.31723, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5efa989e28ccbc535a307dd0" }, { "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Intro to NerdStorage", + "title": "Map page views by region in a custom app", "type": "developer", "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "custom app", + "map", + "page views", + "region", + "nerdpack" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-01T01:55:37Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-02T02:15:05Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.58642, + "_score": 303.99692, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "sections": "Import additional modules from New Relic One", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5efa993c196a67066b766469" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Intro to New Relic One API components", + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 68.79929, + "_score": 285.90182, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ @@ -6905,7 +6603,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-01T01:54:33Z", + "published_at": "2020-10-02T02:13:49Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -6913,64 +6611,56 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 52.317112, + "_score": 282.62482, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "tags": "New Relic One CLI", + "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" }, "id": "5efa9973e7b9d242237bab39" - }, + } + ], + "/explore-docs/intro-to-sdk": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-02T02:16:27Z", + "title": "Build apps", + "updated_at": "2020-10-02T02:16:27Z", "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-01T01:55:36Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 48.02943, + "_score": 874.2538, "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "5efa989e196a671300766404" - } - ], - "/explore-docs/intro-to-sdk": [ + "id": "5efa999d64441fc0f75f7e21" + }, { "sections": [ "Intro to NerdStorage", @@ -6991,7 +6681,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-01T01:55:37Z", + "published_at": "2020-10-02T02:16:27Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -6999,7 +6689,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 694.40894, + "_score": 678.8705, "_version": null, "_explanation": null, "sort": null, @@ -7044,7 +6734,7 @@ "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 666.2645, + "_score": 625.5879, "_version": null, "_explanation": null, "sort": null, @@ -7094,7 +6784,7 @@ "body": "A DevOps transformation requires a cultural shift so that teams can build new skills and motivations for the type of cross-team work required in a true DevOps practice. The transformation can be difficult when the people involved do not see the benefits of change as a clear objective. Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared. They also provide clear boundaries on service expectations that help teams achieve greater velocity and freedom in experimenting with new approaches. This tutorial defines SLOs for successful service delivery objectives and utilize New Relic instrumentation to surface the current performance metrics relative to those objectives. Measurable SLOs and visibility into your current progress against those SLOs ensure that you will be able to properly assess future optimization efforts. Service level components An SLO is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI); for example: Average response time Response time percentile Application availability SLOs clarify a target value for SLIs; for example: Average response time should be less than 200 ms 95% of requests should be completed within 250 ms Availability of the service should be 99.99% Logically group SLOs together to provide an overall boolean indicator of whether or not the service is meeting expectations. For example, a helpful SLO for alerting purposes could be: 95% of requests completed within 250 ms AND availability is 99.99% Service level components Example values SLI (Indicator) HTTP status codes SLO (Objective) < 1% HTTP 500s over 30 days SLA (Agreement) For every additional .1% of HTTP 500s, 5% refund of total contract Resources Value stream mapping can be a useful exercise to work through before setting SLOs. Work with your teams to clarify key components of your service and the appropriate metrics. Use these inputs as starting points for this tutorial. In addition: Learn about SLOs, SLIs, and SLAs from the Google Cloud Platform blog. Learn how New Relic has applied SLOs and SLIs into its reliability practices form this SREcon18 Americas presentation (approximately 21 minutes). 1. Build an inventory of services requiring SLOs Start defining SLOs for your application by first taking an inventory of the services that your application provides to both your internal and external customers. Draft a list of services. Make the scope of services you consider as comprehensive as possible. Engage your team members and other stakeholders to validate the list for completeness. Segment your application stack to understand the potential components that might require SLOs. For example, most applications can be segmented as: Application (backend/microservices) Dependency services (such as the message queue) Database Website Underlying servers This example lists components that would benefit from SLOs: Customer type Component name Owner Language stack Operating system External Service 1 John D. Java RHEL 6 Internal Service 2 Jane A. .NET Win2003 R2 Internal ActiveMQ John D. Java AIX External Website Jane A. Classic ASP Win2000 Internal MS SQL Dave Z. n/a Win2003 R2 Building a definitive list of services that require an SLO can be challenging, because an application often consists of many endpoints with complex interdependencies. Begin your SLO journey with pragmatism. Start by defining a broader, simpler set of SLOs that are driven by what your customers care about most and what your team can control. As your teams better align around SLOs, you can then begin to fine-tune and add more complexity. 2. Research customer expectations for SLOs Once you have an inventory of services, begin to gather the information you need to define the SLOs for those services. Interviews with customers that depend on your services are often valuable for understanding service expectations. For example, to define SLOs for internal teams, New Relic, ask questions such as: If possible, can you broadly categorize the types of requests we can expect from you and your service? To what extent do you or your service depend on timely responses to requests? Are there requests for which response time is not critical? How does your service handle unavailable dependencies or data? What is the maximum amount of unavailable data that your service can handle? At what threshold does your service fail if a request takes too long? What are acceptable rates of errors? What would a SLA look like between our product and yours? Existing usage data can also be a helpful research input. 3. Define SLOs Using the research on customer expectations that you gathered, draft a focused set of SLOs. New Relic recommends setting SLOs against one or more of the following SLIs: Application availability percentage Average response time Response percentile Error rate Apdex value Also, consider instrumenting and tracking the following SLIs: Throughput (peak and trough) Database call count and duration DNS and SSL timing DOM processing and page rendering Mean-time-to-detection (MTTD) For a more comprehensive list of potential areas to measure, see Measuring DevOps. Recommendation: To determine if your application is performing to customer expectations: Consider combining multiple SLIs (for example, availability and response time) into one SLO. Aim to define a consistent set of conditions across all of the services in your list. Consult your team and stakeholders to validate that the SLOs you set are reasonable, consistently attainable (even if you are not currently meeting them), and aligned to customer expectations. After you finish this step, you should have a set of well-defined SLOs and SLIs. 4. Determine what can be instrumented Now you are ready to deploy agents or monitors to establish a performance baseline for the SLIs you created. With proper instrumentation in place, you will have visibility into the performance indicators that matter for your team and your customers. In addition, you will also have a clear understanding of how to meet your SLOs. Identify the service components your team will optimize. Verify which application tiers meet New Relic monitoring requirements. To ensure you have robust baselines from which to work, determine the level of instrumentation that is possible (or allowed) within your organization. There may be situations where instrumentation of the current on-premise environment is not viable. For example, firewalls with certain settings may not permit New Relic agents to transmit data. Recommendation: If the application has a web front end in these situations, use New Relic Synthetics. Synthetics offers non-agent monitoring while still providing the ability to establish a baseline. To instrument the example applications and components in this tutorial, use these New Relic products: New Relic products Customer type Component name Tier owner Language stack Server OS New Relic products External Service 1 John D. Java RHEL 6 APM, Infrastructure, Synthetics Internal Service 2 Jane A. .Net Win2003 R2 APM, Infrastructure Internal ActiveMQ John D. Java AIX APM, Plugins External Website Jane A. Classic ASP Win2000 Synthetics Internal MS SQL Dave Z. NA Win2003 R2 Infrastructure, On-host integration APM installation After reviewing the compatibility and requirements for New Relic APM, install the APM agent on your application stack. Steps for installing APM agents vary based on language agent type. Follow the installation procedures for specific APM agents. Infrastructure installation After reviewing the requirements for New Relic Infrastructure, follow the installation procedures to install the Infrastructure agent on instances that host your applications. The New Relic Infrastructure agent requires the following host permissions: Linux: To install and run the agent, you must have root privileges. Windows: To install and run the agent, you must have Administrator privileges. Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations based on their availability. New Relic supports several commonly used application components, including MySQL, Apache, NGINX, and more. For more information, see New Relic's on-host integrations documentation. Synthetics New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. Follow the procedures to create a simple browser check. Be sure to verify that your website URL is accessible from the Synthetics public network locations. Browser New Relic Browser provides deep insights into how your users are interacting with your application or website. Browser complements Synthetics with data based on actual user experiences, which is useful in discerning how DevOps efforts are ultimately improving the experience for the customer. For more information, see the compatibility and requirements, then install the New Relic Browser agent. Mobile The growing role of mobile apps in customer experience often spurs new performance data needs. Installation of New Relic Mobile lets DevOps teams instrument iOS and Android applications to gain a fuller understanding of service delivery quality. Plugins Developers can use the New Relic Plugins product to create plugins that monitor numerical metrics provided by external services, hosts, or equipment. You can install existing plugins from Plugin Central, or plan, develop, test, and create your own plugins. 5. Review the default metrics After you deploy the agents and monitors, use service maps to review the default metrics that New Relic captures. For example, a typical service map show many of the common SLIs that application teams rely on, including response time, Apdex, throughput, and error rate metrics from APM. It also shows page load time, Ajax response, throughput, and error rate from Browser. rpm.newrelic.com > Service maps: To explore detailed granularity for any area, use the service map's nodes. 6. Set up custom instrumentation To close any remaining gaps in visibility for your SLIs, use custom instrumentation. New Relic provides several avenues for adding custom instrumentation, including: Making API calls to agents from inside your source code Packaging XML-based custom instrumentation modules with deployed applications Adding UI-based instrumentation without a code deploy In addition, you can add custom attributes to each transaction event that match application performance factors to critical business information. Then you can track those attributes in Insights dashboards. For more information, see the custom instrumentation documentation for your application: APM Browser Infrastructure Insights Mobile Synthetics 7. Create Insights dashboards to track SLIs Once you implement the appropriate instrumentation, it is easy to visualize your service level indicators with New Relic Insights dashboards. Insights provides a single location to query and view all the data that New Relic products gather. For example, Insights helps visualize the following data gathered from New Relic products: Infrastructure: Use default Infrastructure events and attributes for your systems, processes, events, storage, and network; Infrastructure integrations; and custom attributes. APM: Use Transaction and TransactionError event types. Browser: Use PageView and PageAction event types. Mobile: Use several Mobile event types. Synthetics: Use SyntheticCheck, SyntheticRequest, and SyntheticPrivateMinion event types. Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your dashboards. Create dashboards that include widgets for the SLI baseline data. Use these widgets and dashboards to establish team dashboards that you can share and use to conduct operations reviews. insights.newrelic.com > (select a dashboard): Query your SLI baseline data, create dashboards with widgets to visualize the data, then share with your team and stakeholders.​ The metrics you capture will become your application's baseline. Share your Insights dashboard with your application team and stakeholders to provide visibility into what is happening with your application and to monitor future performance. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 650.72076, + "_score": 612.11255, "_version": null, "_explanation": null, "sort": null, @@ -7109,44 +6799,6 @@ }, "id": "5f5b215064441f4c48e06825" }, - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-01T01:54:33Z", - "title": "Build apps", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 638.272, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" - }, - "id": "5efa999d64441fc0f75f7e21" - }, { "sections": [ "Add tables to your New Relic One application", @@ -7168,7 +6820,7 @@ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-01T01:55:36Z", + "published_at": "2020-10-02T02:16:28Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -7176,7 +6828,7 @@ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 612.83484, + "_score": 594.58655, "_version": null, "_explanation": null, "sort": null, @@ -7190,6 +6842,229 @@ "id": "5efa989ee7b9d2ad567bab51" } ], + "/explore-docs/nr1-catalog": [ + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-02T02:12:20Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 301.69614, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + }, + "id": "5efa989e28ccbc535a307dd0" + }, + { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", + "sections": [ + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-02T02:09:27Z", + "title": "New Relic Developers", + "updated_at": "2020-10-02T01:51:38Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 198.58388, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" + }, + "id": "5d6fe49a64441f8d6100a50f" + }, + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "sections": [ + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" + ], + "published_at": "2020-10-02T02:10:51Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "document_type": "page", + "popularity": 1, + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 168.43677, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + }, + "id": "5f28bd6ae7b9d267996ade94" + }, + { + "sections": [ + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" + ], + "title": "Serve, publish, and deploy your New Relic One app", + "type": "developer", + "tags": [ + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-09-02T02:05:55Z", + "document_type": "page", + "popularity": 1, + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 140.54659, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" + }, + "id": "5efa999de7b9d283e67bab8f" + }, + { + "sections": [ + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" + ], + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-02T02:13:49Z", + "updated_at": "2020-08-21T01:45:19Z", + "document_type": "page", + "popularity": 1, + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 136.29944, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "NR One Catalog", + "body": ", you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already" + }, + "id": "5efa9973196a67d16d76645c" + } + ], "/explore-docs/nr1-subscription": [ { "sections": [ @@ -7213,7 +7088,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:12:20Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -7221,7 +7096,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 262.57266, + "_score": 256.43732, "_version": null, "_explanation": null, "sort": null, @@ -7265,7 +7140,7 @@ "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 148.79468, + "_score": 143.04523, "_version": null, "_explanation": null, "sort": null, @@ -7288,7 +7163,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-01T01:54:35Z", + "published_at": "2020-10-02T02:16:27Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -7296,7 +7171,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 134.74843, + "_score": 132.77534, "_version": null, "_explanation": null, "sort": null, @@ -7333,7 +7208,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-01T01:56:53Z", + "published_at": "2020-10-02T02:10:51Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -7344,7 +7219,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.66484, + "_score": 121.41413, "_version": null, "_explanation": null, "sort": null, @@ -7396,7 +7271,7 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. When the Lambda is invoked, log data is sent to CloudWatch. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.0019, + "_score": 117.686356, "_version": null, "_explanation": null, "sort": null, From 7a1124d5835371089ad522fe46f31150a0f42c94 Mon Sep 17 00:00:00 2001 From: nr-opensource-bot Date: Sun, 4 Oct 2020 01:05:36 +0000 Subject: [PATCH 2/7] chore(related-content): updated related content data --- src/data/related-pages.json | 8312 ++++++++++++++++++----------------- 1 file changed, 4220 insertions(+), 4092 deletions(-) diff --git a/src/data/related-pages.json b/src/data/related-pages.json index ac0b239d9..5dfdc2acb 100644 --- a/src/data/related-pages.json +++ b/src/data/related-pages.json @@ -1,163 +1,216 @@ { - "/collect-data/custom-attributes": [ + "/build-apps/howto-use-nrone-table-components": [ { "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "url": "https://developer.newrelic.com/components/table-header-cell/", "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Collect data - any source", - "Build queries with NerdGraph", - "Query data with NRQL" + "TableHeaderCell", + "Usage", + "Props" ], - "published_at": "2020-10-02T02:15:06Z", - "title": "Collect data", - "updated_at": "2020-10-02T02:15:06Z", + "published_at": "2020-10-03T13:51:17Z", + "title": "TableHeaderCell", + "updated_at": "2020-08-03T04:46:36Z", "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.79254, + "_score": 507.47113, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "TableHeaderCell", + "sections": "TableHeaderCell", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component." }, - "id": "5efa997328ccbc768c307de2" + "id": "5efa9906196a67523e76646e" }, { - "category_2": "Measure DevOps success", - "nodeid": 16556, + "image": "", + "url": "https://developer.newrelic.com/components/table-row/", "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: track experience indicators", - "Prerequisites", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Utilize data to separate performance by cohort and debug issues at the customer level", - "For more help" + "TableRow", + "Usage", + "Props" ], - "title": "Customer experience improvement: track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-09-30T05:57:38Z", - "updated_at": "2020-09-27T21:45:56Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "published_at": "2020-10-03T13:51:17Z", + "title": "TableRow", + "updated_at": "2020-08-03T04:45:42Z", + "type": "developer", + "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", "document_type": "page", "popularity": 1, - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 105.98125, + "_score": 415.10007, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" + "title": "TableRow", + "sections": "TableRow", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component." }, - "id": "5f5adb2728ccbc7152532752" + "id": "5efa98d564441f93435f7e24" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32796, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 414.3131, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" + }, + "id": "5efa999d64441fc0f75f7e21" + }, + { + "category_2": "Cloud adoption", + "nodeid": 16121, "sections": [ "New Relic solutions", "Measure DevOps success", "Cloud adoption", "Optimize your cloud native environment", - "Customer experience improvement: Track experience indicators", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Use data to separate performance by cohort and debug issues at the customer level", + "Create application baselines", + "1. Identify components", + "2. Determine compatibility", + "3. Deploy monitoring", + "4. Gather metrics", + "5. Set up Dashboards", + "Expert tips", "For more help" ], - "title": "Customer experience improvement: Track experience indicators", + "title": "Create application baselines", "category_0": "New Relic solutions", "type": "docs", "category_1": "New Relic solutions", - "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-09-30T16:45:19Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", + "image": "", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", + "published_at": "2020-10-03T21:26:31Z", + "updated_at": "2020-09-27T20:07:57Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 105.74365, + "_score": 303.5249, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: Track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" + "title": "Create application baselines", + "sections": "1. Identify components", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" }, - "id": "5f5ac17528ccbce4f0532733" + "id": "5ad48685c75d0766faa181bd" }, { - "category_2": "Browser agent release notes", - "nodeid": 40791, "sections": [ - "Browser agent release notes", - "Browser Agent v1184", - "Release Dates", - "New Features", - "Added support for custom attributes on PageViewTiming events", - "Issue Resolutions", - "How to upgrade your agent" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Browser Agent v1184", - "category_0": "Release notes", - "type": "docs", - "category_1": "Browser agent release notes", - "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", - "published_at": "2020-10-02T05:37:45Z", - "updated_at": "2020-10-02T05:37:45Z", - "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", - "info": "", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-03T13:47:57Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", + "popularity": 1, + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.27701, + "_score": 292.61133, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Added support for custom attributes on PageViewTiming events", - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" + "title": "Map page views by region in a custom app", + "sections": "Import the TableChart component", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" }, - "id": "5f76bca928ccbcaa75337d9b" - }, + "id": "5efa993c196a67066b766469" + } + ], + "/automate-workflows/5-mins-tag-resources": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -177,29 +230,28 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-02T02:09:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.39448, + "_score": 178.94102, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" - } - ], - "/automate-workflows/automated-tagging": [ + }, { "image": "", "url": "https://developer.newrelic.com/automate-workflows/", @@ -209,631 +261,625 @@ "Quickly tag resources", "Set up New Relic using Helm charts", "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", "Automate common tasks", + "Set up New Relic using the Kubernetes operator", "Set up New Relic using Terraform" ], - "published_at": "2020-10-02T02:19:13Z", + "published_at": "2020-10-03T13:46:53Z", "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 145.57828, + "_score": 159.03725, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate workflows", - "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" }, "id": "5efa999c196a67dfb4766445" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Amazon integrations", + "Get started", + "AWS integrations list", + "Troubleshooting", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", + "For more help" ], - "published_at": "2020-10-02T02:09:27Z", - "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Integrations and managed policies", + "category_0": "Integrations", + "type": "docs", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.44635, + "_score": 121.494095, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Automate common tasks", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5d6c1f4828ccbce6928f6fe0" }, { - "category_2": "Measure DevOps success", - "nodeid": 34966, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", - "For more help" + "Get started with the New Relic CLI", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Get your application details", + "Add a simple tag to your application", + "Bonus step: Create a deployment marker", + "Next steps" ], - "title": "Automate instrumentation", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-09-30T16:47:41Z", - "updated_at": "2020-09-28T01:04:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "title": "Get started with the New Relic CLI", + "type": "developer", + "tags": [ + "api key", + "New Relic CLI", + "Tags", + "Entity", + "Deployment markers" + ], + "external_id": "531f2f3985bf64bb0dc92a642445887095048882", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", + "published_at": "2020-10-03T13:47:58Z", + "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.23883, + "_score": 99.813774, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate instrumentation", - "sections": "Automate instrumentation", - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" + "title": "Get started with the New Relic CLI", + "sections": "Get started with the New Relic CLI", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "tags": "New Relic CLI", + "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" }, - "id": "5f5e0c14196a67e25fce6a8a" + "id": "5efa999c196a67c4e1766461" }, { - "category_2": "Examples", - "nodeid": 34236, + "category_2": "Troubleshooting", + "nodeid": 40351, "sections": [ - "NerdGraph", + "New Relic Alerts", "Get started", - "Examples", - "NerdGraph tagging API tutorial", - "Read tags for an entity", - "Add tags for an entity", - "Remove a tag from an entity", - "Delete specific tag values for an entity", - "Replace all tag values for an entity", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Tag information not showing up for entity in Infra alert condition", + "Problem", + "Solution", + "Cause", "For more help" ], - "title": "NerdGraph tagging API tutorial", - "category_0": "APIs", + "title": "Tag information not showing up for entity in Infra alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "NerdGraph", - "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "category_1": "New Relic Alerts", + "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", - "published_at": "2020-09-30T15:47:49Z", - "updated_at": "2020-07-26T05:41:24Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 86.927345, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "NerdGraph tagging API tutorial", - "sections": "NerdGraph tagging API tutorial", - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" - }, - "id": "5d8024fc28ccbcc5e9499cf1" - }, - { - "image": "https://newrelic.com/content/dam/hercules-qa/platform_fso_experience_july2020.png", - "url": "https://newrelic.com/platform/full-stack-observability", - "sections": [ - "Full-Stack Observability", - "Full-Stack Observability includes:", - "APM", - "Infrastructure Monitoring", - "Serverless Monitoring", - "Digital Experience Monitoring", - "Logs in Context", - "Experience Full-Stack Observability", - "Free access to New Relic. Forever.", - "COMPANY", - "CONNECT", - "international" - ], - "published_at": "2020-10-02T02:00:13Z", - "title": "Full Stack Observability | New Relic", - "updated_at": "2020-09-30T02:36:24Z", - "type": "", - "external_id": "d62202a5e448becf8db9ed0c894dfd409d3a555a", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", + "published_at": "2020-10-03T15:59:21Z", + "updated_at": "2020-09-30T09:38:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", + "document_type": "troubleshooting_doc", "popularity": 1, - "body": "logo-newrelic Search Products Pricing Solutions Help Center About New Relic for iOS or Android    New Relic Insights App for iOS Search icon Sign Up Log In Products New Relic One Platform Overview Telemetry Data Platform Full-Stack Observability Applied Intelligence Solutions By Topic DevOps Cloud Adoption Cloud Native Digital Customer Experience By Industry E-commerce and Retail Media Public Sector By Technology Amazon Web Services Pivotal Cloud Foundry Microsoft Azure Google Cloud Platform Kubernetes Help Center Learn Docs Build on New Relic Explore open source projects Training Get help Community forum Global technical support Expert services About Our Customers Over 17,000 customers love New Relic, from Fortune 500 enterprises to small businesses around the globe. Our Blog The latest news, tips, and insights from the world of New Relic and digital intelligence. Our Company About Us Leadership Meetups and Events Resources   Investor Relations Newsroom Partner Program Contact Us logo-newrelic Want to use our logo? There's a page for that, including instructions and different styles and formats. Sorry about grabbing your right-click. Just trying to be helpful. You can also go home. Back to top icon Full-Stack Observability Visualize, analyze, and troubleshoot your entire software stack in one curated, unified platform. And by automatically connecting infrastructure health with application performance and end-user behavior, you can cut through the noise to find the signal. Fast. That means less time troubleshooting, and more time building great software. Sign up for free Full-Stack Observability includes: APM Find root causes and fix issues fast. In-depth transaction details show exact method calls with line numbers, including external dependencies for apps of any size and complexity. Get a complete picture by combining key metrics from mobile and browser apps with supporting services, data stores, and hosts. Capabilities include: Application Monitoring Distributed Tracing (New Relic Edge) Infrastructure Monitoring Gain visibility into all of your infrastructure—including servers and VMs on-premises, cloud resources and cloud-native infrastructure. Then connect the health and performance of all of your hosts, services, containers, and resources with the richest application context, logs, and configuration changes, so you can understand, identify, and troubleshoot problems faster. Learn more about Infrastructure Monitoring Serverless Monitoring Deliver serverless apps with confidence by rapidly identifying when something goes wrong and quickly pinpointing the problem—without wading through millions of invocation logs. Auto-instrument monitoring and observability to your serverless functions without requiring code changes. And auto-instrument tracing for your legacy application components alongside the performance of modern serverless components—from backend infrastructure to client-side apps. Learn more about Serverless Monitoring Digital Experience Monitoring Combine RUM, synthetic, and native app monitoring to proactively ensure uptime and performance across services, URLs, APIs, and third party resources on web and mobile. Benchmark and improve end-user experience for every deployment and code change. End-to-end visibility of latency and errors makes it easy to troubleshoot customer-impacting issues faster, and user-centric perceived performance metrics help you optimize page loads. Capabilities include: Browser Monitoring Mobile Monitoring Synthetics Monitoring Logs in Context On top of complete Log Management provided in Telemetry Data Platform, Full-Stack Monitoring provides Logs in Context. Logs are automatically correlated with curated content for errors, traces, and spans ensuring the deepest and fastest root-cause analysis. Learn more about Log Management Learn more about configuring Logs in Context Experience Full-Stack Observability Full-Stack Observability lets you easily visualize and troubleshoot your entire software stack in one connected experience.  Free access to New Relic. Forever. Monitoring your stack should never include host-based guessing games or hidden costs—just simple pricing with no surprises. Sign up now Customers trust New Relic. COMPANY Careers and Culture Partner Program Investor Relations NewRelic.org Suppliers Portal CONNECT Contact Us Request Demo Events international newrelic.co.jp (日本語) newrelic.fr (Français) newrelic.de (Deutsch) newrelic.co.kr (한국어) Terms of Service DMCA Policy Privacy Policy Cookie Policy UK Slavery Act of 2015 ©2008-20 New Relic, Inc. All rights reserved", - "info": "", + "info": "Tags from events not indexed by New Relic do not appear.", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 83.77161, + "_score": 85.94252, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Full Stack Observability | New Relic", - "sections": "Full-Stack Observability", - "body": " home. Back to top icon Full-Stack Observability Visualize, analyze, and troubleshoot your entire software stack in one curated, unified platform. And by automatically connecting infrastructure health with application performance and end-user behavior, you can cut through the noise to find the signal" + "title": "Tag information not showing up for entity in Infra alert condition", + "sections": "New Relic Alerts", + "info": "Tags from events not indexed by New Relic do not appear.", + "category_1": "New Relic Alerts", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" }, - "id": "5f22638664441f8d032a48d9" + "id": "5f4c3992e7b9d2c2d203eddd" } ], - "/build-apps/add-query-mutate-data-nerdstorage": [ + "/collect-data/custom-events": [ { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 407.869, + "_score": 103.23982, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add, query, and mutate data using NerdStorage", - "body": " your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your" + "title": "Data requirements and limits for custom event data", + "sections": "Custom events", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "59f4354f4bb81c2ea8b80d0a" }, { + "category_2": "Logs in context with agent APIs", + "nodeid": 36921, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Annotate logs for logs in context using APM agent APIs", + "APM agent trace metadata and linking metadata APIs", + "Resources for correctly annotating logs", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "Annotate logs for logs in context using APM agent APIs", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", + "published_at": "2020-10-03T23:04:51Z", + "updated_at": "2020-09-27T21:36:25Z", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 117.627884, + "_score": 89.17322, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to NerdStorage", - "sections": "Intro to NerdStorage", - "info": "Intro to NerdStorage on New Relic One", - "tags": "nerdstorage", - "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" + "title": "Annotate logs for logs in context using APM agent APIs", + "sections": "Logs in context with agent APIs", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "category_2": "Logs in context with agent APIs", + "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f37535c196a67c8c055e5ff" }, { + "category_2": "Custom events", + "nodeid": 6256, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Event data sources", + "Default events", + "Custom events", + "APM: Report custom events", + "Data considerations", + "Record a custom event", + "Timestamps", + "Limits and restricted characters", + "Reserved words", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "APM: Report custom events", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "published_at": "2020-10-03T15:13:27Z", + "updated_at": "2020-09-24T07:10:11Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "New Relic APM: how to report custom events and attributes.", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.05325, + "_score": 74.77109, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "APM: Report custom events", + "sections": "Custom events", + "info": "New Relic APM: how to report custom events and attributes.", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5f480a5a64441f578bfdcdb1" }, { + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" - ], - "title": "Query and store data", - "type": "developer", - "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-02T02:10:50Z", - "updated_at": "2020-08-01T01:42:02Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 78.844635, + "_score": 57.338745, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and store data", - "sections": "Query and store data", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" + "title": "Report custom event data", + "sections": "Custom events", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989e28ccbc2f15307deb" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Collect data - any source", - "Build queries with NerdGraph", - "Query data with NRQL" + "Collect data from any source", + "Agent APIs", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API", + "Log API" ], - "published_at": "2020-10-02T02:15:06Z", - "title": "Collect data", - "updated_at": "2020-10-02T02:15:06Z", + "title": "Collect data from any source", "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "tags": [ + "Agent API", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API" + ], + "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", + "image": "", + "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-14T01:45:09Z", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 76.49695, + "_score": 55.268936, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Collect data", - "sections": "Query data with NRQL", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "sections": "Agent APIs", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "tags": "Agent API", + "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" }, - "id": "5efa997328ccbc768c307de2" + "id": "5efa997128ccbc3c9a307dfd" } ], - "/build-apps/howto-use-nrone-table-components": [ + "/automate-workflows/get-started-new-relic-cli": [ { - "image": "", - "url": "https://developer.newrelic.com/components/table-header-cell/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "TableHeaderCell", - "Usage", - "Props" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-02T02:19:13Z", - "title": "TableHeaderCell", - "updated_at": "2020-08-03T04:46:36Z", + "published_at": "2020-10-03T13:45:46Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", - "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 507.8309, + "_score": 328.55396, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "TableHeaderCell", - "sections": "TableHeaderCell", - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component." + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa9906196a67523e76646e" + "id": "5d6fe49a64441f8d6100a50f" }, { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:46:53Z", + "title": "Automate workflows", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 416.98404, + "_score": 308.78314, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "sections": "Set up New Relic using Helm charts", + "body": " it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa999c196a67dfb4766445" }, { - "image": "", - "url": "https://developer.newrelic.com/components/table-row/", "sections": [ - "TableRow", - "Usage", - "Props" + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "TableRow", - "updated_at": "2020-08-03T04:45:42Z", + "title": "Quickly tag a set of resources", "type": "developer", - "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 416.6728, + "_score": 180.13968, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "TableRow", - "sections": "TableRow", - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component." + "title": "Quickly tag a set of resources", + "sections": "Install the New Relic CLI", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" }, - "id": "5efa98d564441f93435f7e24" + "id": "5efa999d64441fa74a5f7e2d" }, { - "category_2": "Cloud adoption", - "nodeid": 16121, + "category_2": "Troubleshooting", + "nodeid": 40351, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Create application baselines", - "1. Identify components", - "2. Determine compatibility", - "3. Deploy monitoring", - "4. Gather metrics", - "5. Set up Dashboards", - "Expert tips", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Tag information not showing up for entity in Infra alert condition", + "Problem", + "Solution", + "Cause", "For more help" ], - "title": "Create application baselines", - "category_0": "New Relic solutions", + "title": "Tag information not showing up for entity in Infra alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", + "category_1": "New Relic Alerts", + "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", - "published_at": "2020-09-30T04:42:24Z", - "updated_at": "2020-09-27T20:07:57Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", + "published_at": "2020-10-03T15:59:21Z", + "updated_at": "2020-09-30T09:38:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", + "document_type": "troubleshooting_doc", "popularity": 1, - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Tags from events not indexed by New Relic do not appear.", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 318.07715, + "_score": 167.13422, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create application baselines", - "sections": "1. Identify components", - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" + "title": "Tag information not showing up for entity in Infra alert condition", + "sections": "New Relic Alerts", + "info": "Tags from events not indexed by New Relic do not appear.", + "category_1": "New Relic Alerts", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" }, - "id": "5ad48685c75d0766faa181bd" + "id": "5f4c3992e7b9d2c2d203eddd" }, { + "category_2": "Alerts release notes", + "nodeid": 40771, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "Component: Violation Tags", + "Update:" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-02T02:15:05Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 298.42667, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Import the TableChart component", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" - }, - "id": "5efa993c196a67066b766469" - } - ], - "/build-apps/add-time-picker-guide": [ - { + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_0": "Release notes", + "type": "docs", + "category_1": "New Relic Platform release notes", + "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", + "published_at": "2020-10-03T19:08:20Z", + "updated_at": "2020-09-29T16:10:16Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.53502, + "_score": 164.08029, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add a time picker to your app", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_1": "New Relic Platform release notes", + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" }, - "id": "5efa999d64441fc0f75f7e21" - }, + "id": "5f735c6928ccbc5f5d337dbb" + } + ], + "/build-apps/map-pageviews-by-region": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -853,391 +899,437 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-02T02:09:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.32797, + "_score": 159.1261, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add a time picker to your app", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Create a custom map view", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, { "sections": [ - "Add tables to your New Relic One application", + "Set up your development environment", "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Add tables to your New Relic One application", + "title": "Set up your development environment", "type": "developer", "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-02T02:16:28Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.745964, + "_score": 113.23041, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5efa9973e7b9d242237bab39" }, { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Intro to New Relic One API components", + "title": "Intro to NerdStorage", "type": "developer", "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-02T02:19:13Z", - "updated_at": "2020-08-14T01:47:12Z", + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-03T13:51:17Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.78988, + "_score": 94.49306, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One apps", - "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" + "sections": "Use NerdStorage in your apps", + "tags": "new relic one apps", + "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa989ee7b9d2048e7bab92" }, { - "image": "", - "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "PlatformStateContext", - "Usage", - "Props" + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "PlatformStateContext", - "updated_at": "2020-08-01T01:47:08Z", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", - "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", + "tags": [ + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-03T13:47:59Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component.", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 93.77365, + "_score": 91.37285, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "PlatformStateContext", - "sections": "PlatformStateContext", - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component." + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created" }, - "id": "5efa997128ccbccc6f307dc0" - } - ], - "/terms": [ + "id": "5efa999de7b9d283e67bab8f" + }, { - "category_2": "Product definitions", - "nodeid": 39646, + "category_2": "Additional standard features", + "nodeid": 1921, "sections": [ - "License information", - "General usage licenses", - "Special services licenses", - "Distributed licenses", - "Referenced policies", - "Product definitions", - "Usage plans", - "FAQ", - "New Relic One pricing: Definitions", + "Browser monitoring", + "Getting started", + "Guides", + "Installation", + "Configuration", + "Browser agent and SPA API", + "Page load timing resources", + "Browser Pro features", + "Additional standard features", + "Performance quality", + "Troubleshooting", + "Browser Geography: Webpage performance by location", + "Contents", + "View performance data by region", + "Use page functions", + "View drill-down details", "For more help" ], - "title": "New Relic One pricing: Definitions", - "category_0": "Licenses", + "title": "Browser Geography: Webpage performance by location", + "category_0": "Browser monitoring", "type": "docs", - "category_1": "License information", - "external_id": "097fc095ef18942f3af1845237742340e36416b8", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", - "published_at": "2020-09-30T09:49:32Z", - "updated_at": "2020-09-10T14:58:10Z", - "breadcrumb": "Contents / Licenses / License information / Product definitions", + "category_1": "Browser monitoring", + "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", + "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", + "published_at": "2020-10-03T23:25:25Z", + "updated_at": "2020-08-15T09:25:45Z", + "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", "document_type": "page", "popularity": 1, - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 360.31372, + "_score": 88.817184, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" + "sections": "View performance data by region", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" }, - "id": "5f23b039196a67030b94f5c4" - }, + "id": "561c8bbc827a6617ad000172" + } + ], + "/collect-data/collect-data-from-any-source": [ { - "image": "", - "url": "https://opensource.newrelic.com/cla/", + "category_2": "Ingest APIs", + "nodeid": 35471, "sections": [ - "NEW RELIC, INC.", - "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", - "Definitions." + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Telemetry SDKs: Report custom telemetry data", + "Requirements and compatibility", + "Available libraries", + "Write your own Telemetry SDK or contribute to an existing one", + "Integrations built with the Telemetry SDKs", + "For more help" ], - "published_at": "2020-10-02T02:24:42Z", - "title": "New Relic Open Source Contributor License Agreement", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", + "title": "Telemetry SDKs: Report custom telemetry data", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", + "published_at": "2020-10-03T22:04:50Z", + "updated_at": "2020-09-17T14:37:52Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 350.71548, + "_score": 165.87003, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" + "title": "Telemetry SDKs: Report custom telemetry data", + "sections": "Telemetry SDKs: Report custom telemetry data", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "category_0": "Telemetry Data Platform", + "category_2": "Ingest APIs", + "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5f31822264441fcbe056a984" + "id": "5d89fefbe7b9d2537ed30dc1" }, { - "category_2": "Data privacy", - "nodeid": 1591, + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Security and Privacy", - "Data privacy", - "Compliance", - "Information security", - "Security bulletins", - "Security controls for privacy", - "Secured content", - "Analytics", - "Data transmission and firewalls", - "Hosting and data storage", - "Data access", - "HTTP parameters disabled by default", + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", "For more help" ], - "title": "Security controls for privacy", - "category_0": "New Relic Security and Privacy", + "title": "Report custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Security and Privacy", - "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", - "published_at": "2020-09-30T05:11:43Z", - "updated_at": "2020-09-24T07:44:02Z", - "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 350.11676, + "_score": 100.41689, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Security and Privacy", - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "category_0": "New Relic Security and Privacy", - "category_1": "Security and Privacy", - "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" + "title": "Report custom event data", + "sections": "Event data sources", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5e30b8a864441f47ebd05cb0" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "category_2": "Developer Edition", - "nodeid": 39641, + "category_2": "Get started", + "nodeid": 36051, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Developer Program Resources", - "For more help" - ], - "title": "Developer Program Resources", - "category_0": "Licenses", - "type": "docs", - "category_1": "Product or service licenses", - "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Get data into New Relic", + "New Relic-built agents and integrations", + "Agent APIs", + "Telemetry SDKs", + "APIs for sending metrics, traces, logs, and events", + "New Relic One applications", + "For more help" + ], + "title": "Get data into New Relic", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", - "published_at": "2020-09-30T09:49:32Z", - "updated_at": "2020-08-08T19:17:02Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", + "published_at": "2020-09-30T16:13:27Z", + "updated_at": "2020-08-10T23:16:39Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", "document_type": "page", "popularity": 1, - "info": "New Relic Developer edition policy", - "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An introduction to how to get data into New Relic. ", + "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 345.99283, + "_score": 99.936935, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" + "sections": "APIs for sending metrics, traces, logs, and events", + "category_0": "Telemetry Data Platform", + "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" }, - "id": "5f338507e7b9d2f670c9de83" + "id": "5f24aa60196a67ede394f5f3" }, { - "category_2": "New Relic One", - "nodeid": 39366, + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Preview access for New Relic One", + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "Preview access for New Relic One", - "category_0": "Licenses", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Product or service licenses", - "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", - "published_at": "2020-10-01T14:37:40Z", - "updated_at": "2020-07-31T04:41:27Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 337.33054, + "_score": 91.28475, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" + "title": "Data requirements and limits for custom event data", + "sections": "Additional Event API requirements", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f23a0f7e7b9d29da9c82305" - } - ], - "/automate-workflows/5-mins-tag-resources": [ + "id": "59f4354f4bb81c2ea8b80d0a" + }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Java agent release notes", + "nodeid": 36271, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 5.8.0", + "New features", + "New OSS SDK", + "Fixes" ], - "published_at": "2020-10-02T02:09:27Z", - "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "title": "Java Agent 5.8.0", + "category_0": "Release notes", + "type": "docs", + "category_1": "APM agent release notes", + "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", + "published_at": "2020-10-03T22:39:52Z", + "updated_at": "2019-10-31T15:19:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 179.33524, + "_score": 75.411766, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "Java Agent 5.8.0", + "sections": "APM agent release notes", + "category_1": "APM agent release notes", + "category_2": "Java agent release notes", + "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" }, - "id": "5d6fe49a64441f8d6100a50f" - }, + "id": "5dbafb88196a67d9b59aa23d" + } + ], + "/automate-workflows/automated-tagging": [ { "image": "", "url": "https://developer.newrelic.com/automate-workflows/", @@ -1247,194 +1339,76 @@ "Quickly tag resources", "Set up New Relic using Helm charts", "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", "Automate common tasks", + "Set up New Relic using the Kubernetes operator", "Set up New Relic using Terraform" ], - "published_at": "2020-10-02T02:19:13Z", + "published_at": "2020-10-03T13:46:53Z", "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 110.57555, + "_score": 205.177, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "title": "Automate workflows", + "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" }, "id": "5efa999c196a67dfb4766445" }, { + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "Get started with the New Relic CLI", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Get your application details", - "Add a simple tag to your application", - "Bonus step: Create a deployment marker", - "Next steps" - ], - "title": "Get started with the New Relic CLI", - "type": "developer", - "tags": [ - "api key", - "New Relic CLI", - "Tags", - "Entity", - "Deployment markers" - ], - "external_id": "531f2f3985bf64bb0dc92a642445887095048882", - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-02T02:15:06Z", - "updated_at": "2020-08-08T01:41:47Z", - "document_type": "page", - "popularity": 1, - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.429504, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Get started with the New Relic CLI", - "sections": "Get started with the New Relic CLI", - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "tags": "New Relic CLI", - "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" - }, - "id": "5efa999c196a67c4e1766461" - }, - { - "category_2": "Troubleshooting", - "nodeid": 40351, - "sections": [ - "New Relic Alerts", + "Amazon integrations", "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", + "AWS integrations list", "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", "For more help" ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", + "title": "Integrations and managed policies", + "category_0": "Integrations", "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-09-30T09:38:17Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "document_type": "page", "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.791504, + "_score": 101.60765, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" }, - "id": "5f4c3992e7b9d2c2d203eddd" + "id": "5d6c1f4828ccbce6928f6fe0" }, { - "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Infrastructure agent release notes", - "Browser agent release notes", - "Synthetics private minion release notes", - "Containerized private minions release notes", - "Mobile agent release notes", - "iOS release notes", - "XCFramework release notes", - "Android release notes", - "tvOS release notes", - "Mobile apps release notes", - "New Relic for Android release notes", - "Insights for tvOS release notes", - "New Relic for iOS release notes", - "Insights for Android release notes", - "Insights for iOS release notes", - "Pages" - ], - "title": "New Relic Platform release notes", - "type": "docs", - "external_id": "417582d1ccf7ed32d7bf3d5059920da59a8254cd", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes", - "published_at": "2020-10-01T02:40:46Z", - "updated_at": "2020-10-01T02:40:46Z", - "breadcrumb": "Contents", - "document_type": "views_page_content", - "popularity": 1, - "body": "New Relic platform release notes include information on new or updated features or functionality to New Relic products (for example: user interface changes, a new REST API call, changes to how data is reported to a given product, etc). Releases are categorized by the type of impact they have on end-users: Bug fixes: For minor non-breaking fixes to features or functionality. Changes: For significant changes to features or functionality that could break a user’s experience, tooling, processes, etc. New: For new features or functionality. For release information on downloadable/versioned New Relic software (such as APM agents, the Browser agent, Synthetics minions, etc.), see Release notes. Release Impact Bug Fixes Changes New Products Alerts APM Browser Cloud Integrations Infrastructure Insights Mobile New Relic Diagnostics On-Host Integrations Synthetics Date Release Name Products Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020 New Relic integration for Kubernetes 1.26.4 Infrastructure Bug Fixes September 9, 2020 3 new integrations available for Azure and AWS Cloud Integrations New September 7, 2020 New Relic integration for Kubernetes 1.26.2 Infrastructure, On-Host Integrations Changes August 26, 2020 New Relic integration for Kubernetes 1.26.1 Infrastructure, On-Host Integrations Changes August 20, 2020 1 new integrations available for AWS and new statistics Cloud Integrations New August 18, 2020 08-18-2020 : Fixed : Missing Synthetics Labels / Tags on Synthetics Violations Alerts Bug Fixes August 13, 2020 New Relic integration for Kubernetes 1.26.0 Infrastructure, On-Host Integrations Changes, New Pages 1 2 3 4 5 6 7 8 9 … next › last »", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.933685, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Platform release notes", - "sections": "New Relic Platform release notes", - "body": " Release Impact September 28, 2020 09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions Alerts New September 25, 2020 09-25-2020 : Entity Tags on Violations for Cloud Integrations Alerts New September 25, 2020 09-25-2020 : API Limit Change : Alerts Changes September 23, 2020" - }, - "id": "5ae1a73a0cc37f6c7bbedee4" - } - ], - "/build-apps/map-pageviews-by-region": [ - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ "Mark your calendar for Nerd Days 1.0", "Get coding", @@ -1451,204 +1425,153 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-02T02:09:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 161.08292, + "_score": 97.11351, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create a custom map view", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Automate common tasks", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, { + "category_2": "Measure DevOps success", + "nodeid": 34966, "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Automate instrumentation", + "Prerequisite", + "1. Make instrumentation part of every build", + "2. Take advantage of integrations and existing tools", + "3. Leverage the power of APIs", + "For more help" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-26T01:47:20Z", + "title": "Automate instrumentation", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", + "published_at": "2020-10-03T22:22:40Z", + "updated_at": "2020-09-28T01:04:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.29813, + "_score": 86.17361, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" + "title": "Automate instrumentation", + "sections": "Automate instrumentation", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5f5e0c14196a67e25fce6a8a" }, { + "category_2": "Examples", + "nodeid": 34236, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "NerdGraph", + "Get started", + "Examples", + "NerdGraph tagging API tutorial", + "Read tags for an entity", + "Add tags for an entity", + "Remove a tag from an entity", + "Delete specific tag values for an entity", + "Replace all tag values for an entity", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "NerdGraph tagging API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", + "published_at": "2020-09-30T15:47:49Z", + "updated_at": "2020-07-26T05:41:24Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.511086, + "_score": 85.94872, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "tags": "new relic one apps", - "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" + "title": "NerdGraph tagging API tutorial", + "sections": "NerdGraph tagging API tutorial", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" }, - "id": "5efa989ee7b9d2048e7bab92" - }, + "id": "5d8024fc28ccbcc5e9499cf1" + } + ], + "/build-apps/add-time-picker-guide": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Serve, publish, and deploy your New Relic One app", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" - ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-02T02:05:55Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.10339, + "_score": 152.2066, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created" + "title": "Build apps", + "sections": "Add a time picker to your app", + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5efa999d64441fc0f75f7e21" }, - { - "category_2": "Additional standard features", - "nodeid": 1921, - "sections": [ - "Browser monitoring", - "Getting started", - "Guides", - "Installation", - "Configuration", - "Browser agent and SPA API", - "Page load timing resources", - "Browser Pro features", - "Additional standard features", - "Performance quality", - "Troubleshooting", - "Browser Geography: Webpage performance by location", - "Contents", - "View performance data by region", - "Use page functions", - "View drill-down details", - "For more help" - ], - "title": "Browser Geography: Webpage performance by location", - "category_0": "Browser monitoring", - "type": "docs", - "category_1": "Browser monitoring", - "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", - "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", - "published_at": "2020-09-30T19:11:28Z", - "updated_at": "2020-08-15T09:25:45Z", - "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", - "document_type": "page", - "popularity": 1, - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.2238, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "View performance data by region", - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" - }, - "id": "561c8bbc827a6617ad000172" - } - ], - "/automate-workflows/get-started-new-relic-cli": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -1668,1127 +1591,986 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-02T02:09:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 328.6854, + "_score": 152.07132, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Add a time picker to your app", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "published_at": "2020-10-02T02:19:13Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "title": "Add tables to your New Relic One application", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-03T13:47:59Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 214.41782, + "_score": 121.62802, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa989ee7b9d2ad567bab51" }, { "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Quickly tag a set of resources", + "title": "Intro to New Relic One API components", "type": "developer", "tags": [ - "tags", - "new relic CLI" + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-14T01:45:08Z", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-03T13:52:21Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 182.31738, + "_score": 121.49266, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Quickly tag a set of resources", - "sections": "Install the New Relic CLI", - "info": "Add tags to applications you instrument for easier filtering and organization.", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "tags": "New Relic One apps", + "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Troubleshooting", - "nodeid": 40351, + "image": "", + "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", - "For more help" + "PlatformStateContext", + "Usage", + "Props" ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-09-30T09:38:17Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", + "published_at": "2020-10-03T13:50:10Z", + "title": "PlatformStateContext", + "updated_at": "2020-08-01T01:47:08Z", + "type": "developer", + "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", + "document_type": "page", "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 179.45114, + "_score": 96.25096, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "title": "PlatformStateContext", + "sections": "PlatformStateContext", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component." }, - "id": "5f4c3992e7b9d2c2d203eddd" - }, + "id": "5efa997128ccbccc6f307dc0" + } + ], + "/build-apps/add-query-mutate-data-nerdstorage": [ { - "category_2": "Alerts release notes", - "nodeid": 40771, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "Component: Violation Tags", - "Update:" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", - "published_at": "2020-09-30T09:07:42Z", - "updated_at": "2020-09-29T16:10:16Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 175.28989, + "_score": 410.7753, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_1": "New Relic Platform release notes", - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + "sections": "Add, query, and mutate data using NerdStorage", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" }, - "id": "5f735c6928ccbc5f5d337dbb" - } - ], - "/collect-data/custom-events": [ + "id": "5efa999d64441fc0f75f7e21" + }, { - "category_2": "Custom events", - "nodeid": 13661, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-03T13:51:17Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 107.99643, + "_score": 118.20842, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Intro to NerdStorage", + "sections": "Intro to NerdStorage", + "info": "Intro to NerdStorage on New Relic One", + "tags": "nerdstorage", + "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Logs in context with agent APIs", - "nodeid": 36921, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Annotate logs for logs in context using APM agent APIs", - "APM agent trace metadata and linking metadata APIs", - "Resources for correctly annotating logs", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Annotate logs for logs in context using APM agent APIs", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-27T21:36:25Z", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.31723, + "_score": 89.12292, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Annotate logs for logs in context using APM agent APIs", - "sections": "Logs in context with agent APIs", - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "category_2": "Logs in context with agent APIs", - "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f37535c196a67c8c055e5ff" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Custom events", - "nodeid": 6256, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "APM: Report custom events", - "Data considerations", - "Record a custom event", - "Timestamps", - "Limits and restricted characters", - "Reserved words", - "For more help" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "title": "APM: Report custom events", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "published_at": "2020-09-30T10:58:45Z", - "updated_at": "2020-09-24T07:10:11Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", - "document_type": "page", - "popularity": 1, - "info": "New Relic APM: how to report custom events and attributes.", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 77.013916, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "APM: Report custom events", - "sections": "Custom events", - "info": "New Relic APM: how to report custom events and attributes.", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" - }, - "id": "5f480a5a64441f578bfdcdb1" - }, - { - "category_2": "Custom events", - "nodeid": 13806, - "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", - "For more help" + "title": "Query and store data", + "type": "developer", + "tags": [ + "nerdgraph query components", + "mutation components", + "static methods" ], - "title": "Report custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-09-30T06:47:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 57.6333, + "_score": 80.095695, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Custom events", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Query and store data", + "sections": "Query and store data", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5efa989e28ccbc2f15307deb" }, { + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Collect data from any source", - "Agent APIs", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API", - "Log API" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Build queries with NerdGraph", + "Collect data - any source", + "Query data with NRQL" ], - "title": "Collect data from any source", + "published_at": "2020-10-03T13:46:53Z", + "title": "Collect data", + "updated_at": "2020-10-03T02:05:02Z", "type": "developer", - "tags": [ - "Agent API", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API" - ], - "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", - "image": "", - "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", - "published_at": "2020-10-02T02:15:06Z", - "updated_at": "2020-08-14T01:45:09Z", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 54.88908, + "_score": 76.463806, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Agent APIs", - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "tags": "Agent API", - "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" + "title": "Collect data", + "sections": "Query data with NRQL", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5efa997128ccbc3c9a307dfd" + "id": "5efa997328ccbc768c307de2" } ], - "/build-apps/publish-deploy": [ + "/collect-data/custom-attributes": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Build queries with NerdGraph", + "Collect data - any source", + "Query data with NRQL" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:46:53Z", + "title": "Collect data", + "updated_at": "2020-10-03T02:05:02Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 169.40805, + "_score": 154.10962, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "sections": "Add custom attributes", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa997328ccbc768c307de2" }, { + "category_2": "Measure DevOps success", + "nodeid": 16556, "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" - ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: track experience indicators", + "Prerequisites", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Utilize data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-02T02:13:50Z", - "updated_at": "2020-09-02T02:04:41Z", + "title": "Customer experience improvement: track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-03T21:48:58Z", + "updated_at": "2020-09-27T21:45:56Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 60.973907, + "_score": 102.0789, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "managing apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" - }, - "id": "5f45bf2864441ffb4dfdcdbb" - }, + "title": "Customer experience improvement: track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" + }, + "id": "5f5adb2728ccbc7152532752" + }, { - "category_2": "Hosting services", - "nodeid": 13151, + "category_2": "Optimize your cloud native environment", + "nodeid": 32796, "sections": [ - "Node.js agent", - "Getting started", - "Installation and configuration", - "Supported features", - "Attributes", - "API guides", - "Hosting services", - "Troubleshooting", - "Install New Relic Node.js agent in GAE flexible environment", - "Use native deploy", - "Build a custom runtime", - "Optional: Disable health checks", - "Get New Relic agent troubleshooting logs from GAE", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: Track experience indicators", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Use data to separate performance by cohort and debug issues at the customer level", "For more help" ], - "title": "Install New Relic Node.js agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Customer experience improvement: Track experience indicators", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "Node.js agent", - "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", - "published_at": "2020-09-30T06:43:04Z", - "updated_at": "2020-08-18T06:29:37Z", - "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "category_1": "New Relic solutions", + "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-09-30T16:45:19Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 31.869926, + "_score": 101.874146, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use native deploy", - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + "title": "Customer experience improvement: Track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" }, - "id": "5972fea707552313d3f9ba8d" + "id": "5f5ac17528ccbce4f0532733" }, { - "category_2": "Hosting services", - "nodeid": 13866, + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Python agent", - "Getting started", - "Installation", - "Configuration", - "Supported features", - "Back-end services", - "Custom instrumentation", - "API guides", - "Python agent API", - "Web frameworks and servers", - "Hosting services", - "Attributes", - "Troubleshooting", - "Install the Python agent in GAE flexible environment", - "Deploy using GAE's native support", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Install the Python agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Python agent", - "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", - "published_at": "2020-09-30T12:16:08Z", - "updated_at": "2020-08-30T17:24:26Z", - "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "published_at": "2020-10-03T13:45:46Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T01:47:47Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 21.70191, + "_score": 96.6042, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Deploy using GAE's native support", - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + "sections": "Add custom attributes", + "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" }, - "id": "5f3fb624196a672fda1cd4a3" + "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Installation", - "nodeid": 13121, + "category_2": "Browser agent release notes", + "nodeid": 40791, "sections": [ - "Go agent", - "Get started", - "Installation", - "Configuration", - "Instrumentation", - "API guides", - "Features", - "Troubleshooting", - "Install the Go agent in GAE flexible environment", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "Browser agent release notes", + "Browser Agent v1184", + "Release Dates", + "New Features", + "Added support for custom attributes on PageViewTiming events", + "Issue Resolutions", + "How to upgrade your agent" ], - "title": "Install the Go agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Browser Agent v1184", + "category_0": "Release notes", "type": "docs", - "category_1": "Go agent", - "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "category_1": "Browser agent release notes", + "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", "image": "", - "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", - "published_at": "2020-09-30T06:40:18Z", - "updated_at": "2020-08-15T09:48:00Z", - "breadcrumb": "Contents / APM agents / Go agent / Installation", - "document_type": "page", - "popularity": 1, - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", + "published_at": "2020-10-03T14:39:21Z", + "updated_at": "2020-10-02T05:37:45Z", + "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 19.987856, + "_score": 95.85435, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + "sections": "Added support for custom attributes on PageViewTiming events", + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" }, - "id": "5f37af50196a67d8f955e63e" + "id": "5f76bca928ccbcaa75337d9b" } ], - "/automate-workflows/get-started-kubernetes": [ + "/terms": [ { - "category_2": "Alert conditions", - "nodeid": 9231, + "category_2": "Product definitions", + "nodeid": 39646, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "License information", + "General usage licenses", + "Special services licenses", + "Distributed licenses", + "Referenced policies", + "Product definitions", + "Usage plans", + "FAQ", + "New Relic One pricing: Definitions", "For more help" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", + "title": "New Relic One pricing: Definitions", + "category_0": "Licenses", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "category_1": "License information", + "external_id": "097fc095ef18942f3af1845237742340e36416b8", + "image": "", + "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-09-10T14:58:10Z", + "breadcrumb": "Contents / Licenses / License information / Product definitions", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.384796, + "_score": 355.7281, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "Create NRQL alert conditions", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5f23b039196a67030b94f5c4" }, { - "category_2": "Alerts release notes", - "nodeid": 40776, + "image": "", + "url": "https://opensource.newrelic.com/cla/", "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "Component: NRQL Conditions (Review Required)", - "Announcing : New Relic One Streaming Alerts", - "Please read the full announcement and FAQ here , and follow the links to enroll." + "NEW RELIC, INC.", + "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", + "Definitions." ], - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "74ae41c7360962287ea605016bf7731035382166", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", - "published_at": "2020-09-30T09:07:43Z", - "updated_at": "2020-09-29T22:06:08Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "published_at": "2020-10-03T14:06:10Z", + "title": "New Relic Open Source Contributor License Agreement", + "updated_at": "2020-09-02T02:08:45Z", + "type": "opensource", + "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", "info": "", + "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 106.77788, + "_score": 347.55396, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_2": "Alerts release notes", - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" + "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" }, - "id": "5f735c6964441f8a6aeb7297" + "id": "5f31822264441fcbe056a984" }, { - "category_2": "Alert conditions", - "nodeid": 7261, + "category_2": "Developer Edition", + "nodeid": 39641, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Set thresholds for an alert condition", - "What is a threshold?", - "View and set thresholds", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Developer Program Resources", "For more help" ], - "title": "Set thresholds for an alert condition", - "category_0": "Alerts and Applied Intelligence", + "title": "Developer Program Resources", + "category_0": "Licenses", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", + "category_1": "Product or service licenses", + "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "published_at": "2020-09-30T13:34:48Z", - "updated_at": "2020-09-30T13:34:48Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-08-08T19:17:02Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", "document_type": "page", "popularity": 1, - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic Developer edition policy", + "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.478226, + "_score": 343.63434, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Set thresholds for an alert condition", - "sections": "Alert conditions", - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" }, - "id": "5f2d847c64441fc0a656a98a" + "id": "5f338507e7b9d2f670c9de83" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Data privacy", + "nodeid": 1591, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" + "Security and Privacy", + "Data privacy", + "Compliance", + "Information security", + "Security bulletins", + "Security controls for privacy", + "Secured content", + "Analytics", + "Data transmission and firewalls", + "Hosting and data storage", + "Data access", + "HTTP parameters disabled by default", + "For more help" ], - "published_at": "2020-10-02T02:19:13Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "Security controls for privacy", + "category_0": "New Relic Security and Privacy", + "type": "docs", + "category_1": "Security and Privacy", + "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "image": "", + "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", + "published_at": "2020-10-03T21:19:32Z", + "updated_at": "2020-09-24T07:44:02Z", + "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.83328, + "_score": 339.96112, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using the Kubernetes operator", - "body": " it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "sections": "Security and Privacy", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "category_0": "New Relic Security and Privacy", + "category_1": "Security and Privacy", + "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" }, - "id": "5efa999c196a67dfb4766445" + "id": "5e30b8a864441f47ebd05cb0" }, { - "category_2": "Understand and use data", - "nodeid": 37981, + "category_2": "New Relic One", + "nodeid": 39366, "sections": [ - "Elastic Container Service integration", - "Get started", - "Install", - "Understand and use data", - "Troubleshooting", - "Recommended ECS alert conditions", - "Recommended alert conditions", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Preview access for New Relic One", "For more help" ], - "title": "Recommended ECS alert conditions", - "category_0": "Integrations", + "title": "Preview access for New Relic One", + "category_0": "Licenses", "type": "docs", - "category_1": "Elastic Container Service integration", - "external_id": "304f01e7a5c68e9ef4dc76782eb9ff6847854065", + "category_1": "Product or service licenses", + "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", "image": "", - "url": "https://docs.newrelic.com/docs/integrations/elastic-container-service-integration/understand-use-data/ecs-integration-recommended-alert-conditions", - "published_at": "2020-09-30T14:33:21Z", - "updated_at": "2020-08-06T00:29:40Z", - "breadcrumb": "Contents / Integrations / Elastic Container Service integration / Understand and use data", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", + "published_at": "2020-10-01T14:37:40Z", + "updated_at": "2020-07-31T04:41:27Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", "document_type": "page", "popularity": 1, - "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", - "body": "New Relic's ECS integration reports and displays performance data from your Amazon ECS environment. This document provides some recommended alert conditions for monitoring ECS performance. Recommended alert conditions Here are some recommended ECS alert conditions. To add these alerts, go to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80% for 5 minutes Restart count NRQL: FROM ContainerSample SELECT max(restartCount) - min(restartCount) Critical: > 5 for 5 minutes For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 60.94577, + "_score": 335.26248, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Recommended ECS alert conditions", - "sections": "Recommended ECS alert conditions", - "info": "Tips for useful alert conditions to set for New Relic's Amazon ECS integration. ", - "body": " to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80" + "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" }, - "id": "5ee05e9e28ccbcef4f4c8dda" + "id": "5f23a0f7e7b9d29da9c82305" } ], - "/collect-data/collect-data-from-any-source": [ + "/build-apps/publish-deploy": [ { - "category_2": "Ingest APIs", - "nodeid": 35471, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Telemetry SDKs: Report custom telemetry data", - "Requirements and compatibility", - "Available libraries", - "Write your own Telemetry SDK or contribute to an existing one", - "Integrations built with the Telemetry SDKs", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Telemetry SDKs: Report custom telemetry data", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", - "published_at": "2020-09-30T19:06:43Z", - "updated_at": "2020-09-17T14:37:52Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 167.56425, + "_score": 168.08011, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Telemetry SDKs: Report custom telemetry data", - "sections": "Telemetry SDKs: Report custom telemetry data", - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "category_0": "Telemetry Data Platform", - "category_2": "Ingest APIs", - "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5d89fefbe7b9d2537ed30dc1" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Custom events", - "nodeid": 13806, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", - "For more help" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "Report custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "title": "Permissions for managing applications", + "type": "developer", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" + ], + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-09-30T06:47:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.921265, + "_score": 59.916683, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Event data sources", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "managing apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5f45bf2864441ffb4dfdcdbb" }, { - "category_2": "Get started", - "nodeid": 36051, + "category_2": "Hosting services", + "nodeid": 13151, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Get data into New Relic", - "New Relic-built agents and integrations", - "Agent APIs", - "Telemetry SDKs", - "APIs for sending metrics, traces, logs, and events", - "New Relic One applications", + "Node.js agent", + "Getting started", + "Installation and configuration", + "Supported features", + "Attributes", + "API guides", + "Hosting services", + "Troubleshooting", + "Install New Relic Node.js agent in GAE flexible environment", + "Use native deploy", + "Build a custom runtime", + "Optional: Disable health checks", + "Get New Relic agent troubleshooting logs from GAE", "For more help" ], - "title": "Get data into New Relic", - "category_0": "Telemetry Data Platform", + "title": "Install New Relic Node.js agent in GAE flexible environment", + "category_0": "APM agents", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", + "category_1": "Node.js agent", + "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", - "published_at": "2020-09-30T16:13:27Z", - "updated_at": "2020-08-10T23:16:39Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", + "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:40:01Z", + "updated_at": "2020-08-18T06:29:37Z", + "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", "document_type": "page", "popularity": 1, - "info": "An introduction to how to get data into New Relic. ", - "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.4702, + "_score": 31.452888, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "APIs for sending metrics, traces, logs, and events", - "category_0": "Telemetry Data Platform", - "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" + "sections": "Use native deploy", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" }, - "id": "5f24aa60196a67ede394f5f3" + "id": "5972fea707552313d3f9ba8d" }, { - "category_2": "Custom events", - "nodeid": 13661, + "category_2": "Hosting services", + "nodeid": 13866, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", + "Python agent", + "Getting started", + "Installation", + "Configuration", + "Supported features", + "Back-end services", + "Custom instrumentation", + "API guides", + "Python agent API", + "Web frameworks and servers", + "Hosting services", + "Attributes", + "Troubleshooting", + "Install the Python agent in GAE flexible environment", + "Deploy using GAE's native support", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", "For more help" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", + "title": "Install the Python agent in GAE flexible environment", + "category_0": "APM agents", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "category_1": "Python agent", + "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:11:18Z", + "updated_at": "2020-08-30T17:24:26Z", + "breadcrumb": "Contents / APM agents / Python agent / Hosting services", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 95.03902, + "_score": 21.4074, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Additional Event API requirements", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "sections": "Deploy using GAE's native support", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5f3fb624196a672fda1cd4a3" }, { - "category_2": "Java agent release notes", - "nodeid": 36271, + "category_2": "Installation", + "nodeid": 13121, "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 5.8.0", - "New features", - "New OSS SDK", - "Fixes" + "Go agent", + "Get started", + "Installation", + "Configuration", + "Instrumentation", + "API guides", + "Features", + "Troubleshooting", + "Install the Go agent in GAE flexible environment", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "title": "Java Agent 5.8.0", - "category_0": "Release notes", + "title": "Install the Go agent in GAE flexible environment", + "category_0": "APM agents", "type": "docs", - "category_1": "APM agent release notes", - "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "category_1": "Go agent", + "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", - "published_at": "2020-09-30T16:19:57Z", - "updated_at": "2019-10-31T15:19:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", - "info": "", + "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", + "published_at": "2020-10-03T17:53:58Z", + "updated_at": "2020-08-15T09:48:00Z", + "breadcrumb": "Contents / APM agents / Go agent / Installation", + "document_type": "page", + "popularity": 1, + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 74.71442, + "_score": 19.775082, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Java Agent 5.8.0", - "sections": "APM agent release notes", - "category_1": "APM agent release notes", - "category_2": "Java agent release notes", - "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" }, - "id": "5dbafb88196a67d9b59aa23d" + "id": "5f37af50196a67d8f955e63e" } ], "/explore-docs/newrelic-cli": [ + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-03T13:46:53Z", + "title": "Automate workflows", + "updated_at": "2020-10-03T02:03:43Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 819.5237, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + }, + "id": "5efa999c196a67dfb4766445" + }, { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -2808,18 +2590,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-02T02:09:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 816.1435, + "_score": 818.796, "_version": null, "_explanation": null, "sort": null, @@ -2852,7 +2634,7 @@ "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-09-30T16:47:41Z", + "published_at": "2020-10-03T22:22:40Z", "updated_at": "2020-09-28T01:04:02Z", "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", @@ -2861,7 +2643,7 @@ "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 770.04724, + "_score": 738.969, "_version": null, "_explanation": null, "sort": null, @@ -2874,6 +2656,97 @@ }, "id": "5f5e0c14196a67e25fce6a8a" }, + { + "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", + "url": "https://developer.newrelic.com/nerd-days/", + "sections": [ + "Nerd Days is a free 1-day event focused on building more perfect software", + "Register for Nerd Days 1.0", + "What’s is Nerd Days exactly…", + "Save the date & join us online", + "Additional Nerd Days Events", + "REGISTER FOR NERD DAYS | AMERICAS", + "Speaker line up", + "Aaron Soto", + "Caitlin Halla", + "David Shanker", + "Jeremy Cooper", + "Joel Worrall", + "John Vajda", + "Jon Thurman", + "Justin Eveland", + "Leon Chapman", + "Lindsy Farina", + "Talia Nassi", + "Thomas Martin", + "Alec Swanson", + "Brian Thomason", + "Chris Trombley", + "Gabe O'Brien", + "Liam Hurrell", + "Michael Caron", + "Phil Weber", + "Sebastian Remirez", + "Tracks", + "Observability", + "Cloud migration", + "Open source", + "Devops journey", + "Fundamentals", + "Nerd Days AMER Agenda", + "DevOps journey", + "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", + "Instrumenting your service using agents", + "New Relic CLI Wizardry", + "5 Steps to Kubernetes Observability", + "Delivering SRE as a Service", + "Building applications on New Relic One", + "Exploring your data using NRQL", + "New Relic AI", + "Going Serverless: Chipping at the monolith", + "Logging for Modern Organizations", + "Grafana and Prometheus with New Relic", + "Lunch with Lew", + "Custom Instrumentation", + "Exploring Data with NerdGraph", + "Tool Consolidation", + "Testing in Production", + "How Open Source powers the New Relic One Catalog", + "Alerts Best Practices", + "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", + "Monitoring your Cloud Usage and Spend", + "Measuring code pipelines", + "Reducing toil with Terraform", + "True availability using Synthetics", + "How Observability-Driven Development accelerates DevOps transformations", + "AWS Modernization", + "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", + "NerdStorageVault: ThirdParty Secrets", + "Closing + Swag", + "Engage with the developer community" + ], + "published_at": "2020-10-03T13:53:28Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T02:00:34Z", + "type": "developer", + "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", + "document_type": "page", + "popularity": 1, + "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 598.24524, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic CLI Wizardry", + "body": " of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes" + }, + "id": "5f3dd5bf28ccbc2349f56e4e" + }, { "sections": [ "New Relic One CLI reference", @@ -2896,7 +2769,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -2904,7 +2777,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 593.96484, + "_score": 585.3855, "_version": null, "_explanation": null, "sort": null, @@ -2916,307 +2789,37 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, "id": "5efa989e28ccbc535a307dd0" - }, + } + ], + "/explore-docs/nerdstorage": [ { "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-02T02:19:13Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 567.46, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" - }, - "id": "5efa999c196a67dfb4766445" - }, - { - "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" - ], - "title": "Quickly tag a set of resources", - "type": "developer", - "tags": [ - "tags", - "new relic CLI" - ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-14T01:45:08Z", - "document_type": "page", - "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 506.2693, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Install the New Relic CLI", - "tags": "new relic CLI", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic" - }, - "id": "5efa999d64441fa74a5f7e2d" - } - ], - "/explore-docs/nr1-common": [ - { - "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 209.2349, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" - }, - "id": "5efa989e28ccbc535a307dd0" - }, - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", - "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-02T02:09:27Z", - "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.96213, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.87393, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, - { - "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-26T01:47:20Z", - "document_type": "page", - "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.79255, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" - }, - "id": "5efa9973e7b9d242237bab39" - }, - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-02T02:19:13Z", - "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.98343, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" - }, - "id": "5efa999c196a67dfb4766445" - } - ], - "/explore-docs/nerdstorage": [ - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ "Build apps", "Guides to build apps", "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", - "Add the NerdGraphQuery component to an application", "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:45:46Z", "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", + "updated_at": "2020-10-03T02:03:44Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 415.31677, + "_score": 415.28625, "_version": null, "_explanation": null, "sort": null, @@ -3249,7 +2852,7 @@ "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", - "published_at": "2020-10-02T02:19:13Z", + "published_at": "2020-10-03T13:47:59Z", "updated_at": "2020-08-30T01:49:16Z", "document_type": "page", "popularity": 1, @@ -3257,7 +2860,7 @@ "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 266.03018, + "_score": 264.67572, "_version": null, "_explanation": null, "sort": null, @@ -3292,7 +2895,7 @@ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-02T02:19:13Z", + "published_at": "2020-10-03T13:52:21Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -3300,7 +2903,7 @@ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 193.15755, + "_score": 187.5668, "_version": null, "_explanation": null, "sort": null, @@ -3326,7 +2929,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -3334,7 +2937,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 175.7587, + "_score": 173.45467, "_version": null, "_explanation": null, "sort": null, @@ -3369,7 +2972,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3377,7 +2980,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.40025, + "_score": 135.3389, "_version": null, "_explanation": null, "sort": null, @@ -3391,181 +2994,171 @@ "id": "5efa989e28ccbc535a307dd0" } ], - "/explore-docs/nr1-cli": [ + "/explore-docs/nr1-nerdpack": [ { "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", + "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", "sections": [ - "New Relic One CLI Nerdpack commands", + "New Relic One CLI subscription commands", "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", + "nr1 subscription:set", + "Subscribe to a Nerdpack", "Usage", "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Aliases", + "nr1 subscription:list", + "See your subscription", + "nr1 subscription:unset", + "Unsubscribe from a Nerdpack" ], - "published_at": "2020-10-02T02:10:51Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "published_at": "2020-10-03T13:52:22Z", + "title": "New Relic One CLI subscription commands", + "updated_at": "2020-08-06T01:44:54Z", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.39819, + "_score": 788.7394, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "New Relic One CLI subscription commands", + "sections": "New Relic One CLI subscription commands", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5f2b6096e7b9d225ebc9de6f" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Intro to NerdStorage", + "published_at": "2020-10-03T13:52:21Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.52965, + "_score": 556.40906, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Intro to New Relic One API components", + "title": "New Relic One CLI reference", "type": "developer", "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "New Relic One app", + "nerdpack commands" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-02T02:19:13Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 69.22942, + "_score": 285.33502, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa989e28ccbc535a307dd0" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "New Relic One CLI catalog commands", + "Command details", + "nr1 catalog:info", + "Get catalog details", + "Usage", + "Options", + "nr1 catalog:submit", + "Send info to the catalog" ], - "title": "Set up your development environment", + "published_at": "2020-10-03T13:51:17Z", + "title": "New Relic One CLI catalog commands", + "updated_at": "2020-08-14T01:49:24Z", "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-26T01:47:20Z", + "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 52.558174, + "_score": 158.70357, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "New Relic One CLI catalog commands", + "sections": "New Relic One CLI catalog commands", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5f28bd6a64441f805eb11a26" }, { "sections": [ @@ -3590,7 +3183,7 @@ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-02T02:17:56Z", + "published_at": "2020-10-03T13:53:28Z", "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, @@ -3598,7 +3191,7 @@ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 48.360214, + "_score": 146.5722, "_version": null, "_explanation": null, "sort": null, @@ -3606,13 +3199,13 @@ "title": "Nerdpack file structure", "sections": "Nerdpack file structure", "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "tags": "New Relic One CLI", + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, "id": "5efa989e196a671300766404" } ], - "/explore-docs/nr1-config": [ + "/explore-docs/nr1-common": [ { "sections": [ "New Relic One CLI reference", @@ -3635,7 +3228,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3643,7 +3236,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 246.60938, + "_score": 205.41022, "_version": null, "_explanation": null, "sort": null, @@ -3657,124 +3250,172 @@ "id": "5efa989e28ccbc535a307dd0" }, { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Set up New Relic using Terraform" ], - "title": "New Relic CLI Reference", + "published_at": "2020-10-03T13:46:53Z", + "title": "Automate workflows", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 155.54877, + "_score": 163.94238, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5efa999c196a67dfb4766445" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-02T02:10:51Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "published_at": "2020-10-03T13:45:46Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T01:47:47Z", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.50067, + "_score": 150.48306, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5d6fe49a64441f8d6100a50f" }, { + "category_2": "Troubleshooting", + "nodeid": 13726, "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 148.66782, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" + }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-26T01:47:20Z", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.75819, + "_score": 132.14163, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5efa9973e7b9d242237bab39" - }, + "id": "5efa989ee7b9d2024b7bab97" + } + ], + "/explore-docs/nr1-cli": [ { "image": "", "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", @@ -3804,7 +3445,7 @@ "nr1 nerdpack:Info", "Shows the state of your Nerdpack in the New Relic's registry" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:22Z", "title": "New Relic One CLI Nerdpack commands", "updated_at": "2020-09-17T01:49:55Z", "type": "developer", @@ -3815,58 +3456,140 @@ "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 109.99419, + "_score": 114.662766, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, "id": "5f28bd6a64441f9817b11a38" - } - ], - "/explore-docs/nr1-nerdpack": [ + }, { + "sections": [ + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" + ], + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-03T13:51:17Z", + "updated_at": "2020-09-08T01:50:19Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 94.04282, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + }, + "id": "5efa989ee7b9d2048e7bab92" + }, + { "sections": [ - "New Relic One CLI subscription commands", - "Command details", - "nr1 subscription:set", - "Subscribe to a Nerdpack", - "Usage", - "Options", - "Aliases", - "nr1 subscription:list", - "See your subscription", - "nr1 subscription:unset", - "Unsubscribe from a Nerdpack" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "published_at": "2020-10-02T02:10:51Z", - "title": "New Relic One CLI subscription commands", - "updated_at": "2020-08-06T01:44:54Z", + "title": "Intro to New Relic One API components", "type": "developer", - "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-03T13:52:21Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 784.3516, + "_score": 63.340195, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI subscription commands", - "sections": "New Relic One CLI subscription commands", - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" }, - "id": "5f2b6096e7b9d225ebc9de6f" + "id": "5efa989e28ccbc4071307de5" + }, + { + "sections": [ + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" + ], + "title": "Set up your development environment", + "type": "developer", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" + ], + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-26T01:47:20Z", + "document_type": "page", + "popularity": 1, + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 47.957104, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + }, + "id": "5efa9973e7b9d242237bab39" }, { "image": "", @@ -3892,7 +3615,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:21Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -3903,18 +3626,20 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 552.89276, + "_score": 46.10025, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" }, "id": "5f28bd6ae7b9d267996ade94" - }, + } + ], + "/explore-docs/nr1-catalog": [ { "sections": [ "New Relic One CLI reference", @@ -3937,7 +3662,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3945,7 +3670,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 296.20563, + "_score": 288.40375, "_version": null, "_explanation": null, "sort": null, @@ -3954,89 +3679,235 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, "id": "5efa989e28ccbc535a307dd0" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic One CLI catalog commands", - "Command details", - "nr1 catalog:info", - "Get catalog details", - "Usage", - "Options", - "nr1 catalog:submit", - "Send info to the catalog" - ], - "published_at": "2020-10-02T02:13:49Z", - "title": "New Relic One CLI catalog commands", - "updated_at": "2020-08-14T01:49:24Z", - "type": "developer", - "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-03T13:45:46Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T01:47:47Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 158.6465, + "_score": 197.41147, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI catalog commands", - "sections": "New Relic One CLI catalog commands", - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" }, - "id": "5f28bd6a64441f805eb11a26" + "id": "5d6fe49a64441f8d6100a50f" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-03T13:52:21Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "document_type": "page", + "popularity": 1, + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 167.05153, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + }, + "id": "5f28bd6ae7b9d267996ade94" + }, + { + "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", + "url": "https://developer.newrelic.com/nerd-days/", + "sections": [ + "Nerd Days is a free 1-day event focused on building more perfect software", + "Register for Nerd Days 1.0", + "What’s is Nerd Days exactly…", + "Save the date & join us online", + "Additional Nerd Days Events", + "REGISTER FOR NERD DAYS | AMERICAS", + "Speaker line up", + "Aaron Soto", + "Caitlin Halla", + "David Shanker", + "Jeremy Cooper", + "Joel Worrall", + "John Vajda", + "Jon Thurman", + "Justin Eveland", + "Leon Chapman", + "Lindsy Farina", + "Talia Nassi", + "Thomas Martin", + "Alec Swanson", + "Brian Thomason", + "Chris Trombley", + "Gabe O'Brien", + "Liam Hurrell", + "Michael Caron", + "Phil Weber", + "Sebastian Remirez", + "Tracks", + "Observability", + "Cloud migration", + "Open source", + "Devops journey", + "Fundamentals", + "Nerd Days AMER Agenda", + "DevOps journey", + "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", + "Instrumenting your service using agents", + "New Relic CLI Wizardry", + "5 Steps to Kubernetes Observability", + "Delivering SRE as a Service", + "Building applications on New Relic One", + "Exploring your data using NRQL", + "New Relic AI", + "Going Serverless: Chipping at the monolith", + "Logging for Modern Organizations", + "Grafana and Prometheus with New Relic", + "Lunch with Lew", + "Custom Instrumentation", + "Exploring Data with NerdGraph", + "Tool Consolidation", + "Testing in Production", + "How Open Source powers the New Relic One Catalog", + "Alerts Best Practices", + "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", + "Monitoring your Cloud Usage and Spend", + "Measuring code pipelines", + "Reducing toil with Terraform", + "True availability using Synthetics", + "How Observability-Driven Development accelerates DevOps transformations", + "AWS Modernization", + "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", + "NerdStorageVault: ThirdParty Secrets", + "Closing + Swag", + "Engage with the developer community" + ], + "published_at": "2020-10-03T13:53:28Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T02:00:34Z", + "type": "developer", + "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", + "document_type": "page", + "popularity": 1, + "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 145.9299, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "How Open Source powers the New Relic One Catalog", + "body": " Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie" + }, + "id": "5f3dd5bf28ccbc2349f56e4e" + }, + { + "sections": [ + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" + ], + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-02T02:17:56Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-03T13:47:59Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 150.53485, + "_score": 138.53897, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" }, - "id": "5efa989e196a671300766404" + "id": "5efa999de7b9d283e67bab8f" } ], "/collect-data/get-started-nerdgraph-api-explorer": [ @@ -4071,7 +3942,7 @@ "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 228.68002, + "_score": 222.40268, "_version": null, "_explanation": null, "sort": null, @@ -4093,28 +3964,28 @@ "Guides to collect data", "Add custom attributes", "Create custom events", - "Collect data - any source", "Build queries with NerdGraph", + "Collect data - any source", "Query data with NRQL" ], - "published_at": "2020-10-02T02:15:06Z", + "published_at": "2020-10-03T13:46:53Z", "title": "Collect data", - "updated_at": "2020-10-02T02:15:06Z", + "updated_at": "2020-10-03T02:05:02Z", "type": "developer", "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.58588, + "_score": 153.26994, "_version": null, "_explanation": null, "sort": null, "highlight": { "sections": "Build queries with NerdGraph", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" }, "id": "5efa997328ccbc768c307de2" }, @@ -4155,7 +4026,7 @@ "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.16411, + "_score": 152.88045, "_version": null, "_explanation": null, "sort": null, @@ -4192,7 +4063,7 @@ "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", "image": "", "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", - "published_at": "2020-09-30T07:03:23Z", + "published_at": "2020-10-03T22:02:24Z", "updated_at": "2020-08-10T23:22:01Z", "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", @@ -4201,7 +4072,7 @@ "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.70594, + "_score": 120.88008, "_version": null, "_explanation": null, "sort": null, @@ -4258,7 +4129,7 @@ "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.38991, + "_score": 119.53827, "_version": null, "_explanation": null, "sort": null, @@ -4302,16 +4173,16 @@ "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", "image": "", "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "published_at": "2020-09-30T10:59:40Z", - "updated_at": "2020-09-30T10:59:40Z", + "published_at": "2020-10-03T15:27:33Z", + "updated_at": "2020-10-03T15:27:33Z", "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", "document_type": "page", "popularity": 1, "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 150.013, + "_score": 176.44135, "_version": null, "_explanation": null, "sort": null, @@ -4323,7 +4194,7 @@ "category_1": "Synthetic monitoring", "category_2": "Using monitors", "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "body": " and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data", + "body": " alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you", "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" }, "id": "5f31b60e196a6742d2fbd6c8" @@ -4351,7 +4222,7 @@ "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", "image": "", "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", - "published_at": "2020-09-30T05:54:57Z", + "published_at": "2020-10-03T21:47:40Z", "updated_at": "2020-09-28T00:43:51Z", "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", @@ -4360,7 +4231,7 @@ "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.43599, + "_score": 115.48256, "_version": null, "_explanation": null, "sort": null, @@ -4407,7 +4278,7 @@ "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.155205, + "_score": 87.78763, "_version": null, "_explanation": null, "sort": null, @@ -4453,7 +4324,7 @@ "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.484604, + "_score": 87.05412, "_version": null, "_explanation": null, "sort": null, @@ -4467,8 +4338,8 @@ "id": "5f2dbb3664441fd3a556a97c" }, { - "category_2": "Rules, limits, and glossary", - "nodeid": 8421, + "category_2": "Alert notifications", + "nodeid": 6481, "sections": [ "New Relic Alerts", "Get started", @@ -4481,39 +4352,42 @@ "Rules, limits, and glossary", "Alerts and Nerdgraph", "REST API alerts", - "Rules and limits for alerts", - "Permission levels", - "Limits", + "Update alert notification channels", + "Reference for updating channels", + "Basic process", "For more help" ], - "title": "Rules and limits for alerts", + "title": "Update alert notification channels", "category_0": "Alerts and Applied Intelligence", "type": "docs", "category_1": "New Relic Alerts", - "external_id": "901afbed24b00ad4bc060e0f1fb57dff969bdd67", + "external_id": "ee8bce401d0623e8b85d84a6a20bd8a72b9764ef", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/rules-limits-glossary/rules-limits-alerts", - "published_at": "2020-09-30T13:40:52Z", - "updated_at": "2020-09-27T14:48:04Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Rules, limits, and glossary", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/update-alert-notification-channels", + "published_at": "2020-09-30T10:06:25Z", + "updated_at": "2020-08-11T06:42:27Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "info": "Read about assorted technical rules and min/max limits for alerts functionality. ", - "body": "This document contains some technical rules and limits for alerts. Permission levels Permissions differ depending on whether you're on our original product-based pricing plan or our New Relic One pricing plan: New Relic One pricing plan See Users and roles. Original pricing plan For accounts on our original product-based pricing plan, the user role determines the Alerts features available: Owner and Admins can add, change, disable, and delete alert policies, conditions, and channels. Users and Restricted Users can only view alert policies and conditions and their settings. Any user role can acknowledge an incident or close a violation. Limits Sub-accounts do not inherit a master account's alert policies. You must create policies separately for all accounts and sub-accounts. The following rules apply both to the New Relic One user interface and to the REST API (v2). New Relic Alerts Minimum value Maximum value Alert policies: Alert policy name 1 character 64 characters Policies per account n/a 10000 policies Products per policy any New Relic product (APM, Mobile, Synthetics, etc.) any New Relic product Alert conditions: Condition name 1 character 64 characters Conditions per policy 0 conditions 500 conditions Infrastructure alert conditions 0 conditions 3700 conditions NRQL query conditions OR Web app response percentiles per account 0 conditions 4000 conditions Targets (product entities) per condition 1 target 1000 targets from 1 or more products Thresholds per condition 0 Warnings, 1 Critical 1 Warning, 1 Critical Alert violations: Duration for condition violation 5 minutes Exception: 1 minute for at least once conditions, because the violation could occur during the first minute (or any minute). 2 hours Violations per incident 1 violation 10,000 violations Violations beyond this limit will not be persisted. Violation Search API - Page Size 1 page (less than or equal to 25 violations) 1000 pages (25K violations) Only use the only-open parameter to retrieve all open violations. If you have more than 25K open violations and need to retrieve them via the REST API, please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to update alerts notification channels. ", + "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 84.44709, + "_score": 84.05259, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Alert notifications", - "body": ", please contact New Relic Support. Notification channels: Notification channel name 1 character 64 characters Channels per account n/a 1000 channels per type Exception: No limits for user channels Channel limitations Depends on channel Depends on channel For more help If you need more help, check out" + "title": "Update alert notification channels", + "sections": "Update alert notification channels", + "info": "Read about how to update alerts notification channels. ", + "category_2": "Alert notifications", + "body": " to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add" }, - "id": "5f34470b28ccbc19cb88dfc3" + "id": "5f2dbad928ccbcb8ca88dfed" } ], - "/automate-workflows/kubernetes-helm-deployment": [ + "/automate-workflows/get-started-kubernetes": [ { "image": "", "url": "https://developer.newrelic.com/automate-workflows/", @@ -4523,509 +4397,317 @@ "Quickly tag resources", "Set up New Relic using Helm charts", "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Set up New Relic using the Kubernetes operator", "Automate common tasks", + "Set up New Relic using the Kubernetes operator", "Set up New Relic using Terraform" ], - "published_at": "2020-10-02T02:19:13Z", + "published_at": "2020-10-03T13:46:53Z", "title": "Automate workflows", - "updated_at": "2020-09-25T01:49:59Z", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 4384.2637, + "_score": 138.6518, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "sections": "Set up New Relic using the Kubernetes operator", + "body": " it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, "id": "5efa999c196a67dfb4766445" }, { - "category_2": "Enable log monitoring", - "nodeid": 34166, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Kubernetes plugin for log forwarding", - "Requirements", - "Enable Kubernetes for logs management", - "View log data", - "What's next?", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Kubernetes plugin for log forwarding", - "category_0": "Log management", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Enable log management", - "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", - "published_at": "2020-09-30T15:46:39Z", - "updated_at": "2020-09-27T16:17:57Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-09-30T20:06:36Z", + "updated_at": "2020-09-30T20:06:35Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 129.76558, + "_score": 108.00552, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + "title": "Create NRQL alert conditions", + "sections": "Create NRQL alert conditions", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5f37c1d064441f0d21a0a5e1" + "id": "5f2d992528ccbc489d88dfc1" }, { - "category_2": "Private locations", - "nodeid": 23821, + "category_2": "Alerts release notes", + "nodeid": 40776, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Install containerized private minions (CPMs)", - "General private minion features", - "Kubernetes-specific features", - "System requirements and compatibility", - "Private location key", - "Sandboxing and Docker dependencies", - "Install and update CPM versions", - "Start the CPM", - "Stop or delete the CPM", - "Show help and examples", - "Show license information", - "Configure CPM", - "Networks", - "Security, sandboxing, and running as non-root", - "Docker image repository", - "Additional considerations for CPM connection", - "For more help" + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "Component: NRQL Conditions (Review Required)", + "Announcing : New Relic One Streaming Alerts", + "Please read the full announcement and FAQ here , and follow the links to enroll." ], - "title": "Install containerized private minions (CPMs)", - "category_0": "Synthetic monitoring", + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_0": "Release notes", "type": "docs", - "category_1": "Synthetic monitoring", - "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", - "published_at": "2020-09-30T17:09:10Z", - "updated_at": "2020-08-13T23:22:19Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", - "document_type": "page", + "category_1": "New Relic Platform release notes", + "external_id": "74ae41c7360962287ea605016bf7731035382166", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", + "published_at": "2020-10-03T14:38:29Z", + "updated_at": "2020-09-29T22:06:08Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", "popularity": 1, - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.08255, + "_score": 101.36392, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Using monitors", - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_2": "Alerts release notes", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" }, - "id": "5f31d981196a678103fbd731" + "id": "5f735c6964441f8a6aeb7297" }, { - "category_2": "Enable and configure", - "nodeid": 38171, + "category_2": "Alert conditions", + "nodeid": 7261, "sections": [ - "Distributed tracing", + "New Relic Alerts", "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Set thresholds for an alert condition", + "What is a threshold?", + "View and set thresholds", "For more help" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", + "title": "Set thresholds for an alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-09-30T14:39:10Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "published_at": "2020-10-03T18:47:38Z", + "updated_at": "2020-09-30T13:34:48Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.06013, + "_score": 95.032394, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 2. (Infinite Tracing) Set up a trace observer", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + "title": "Set thresholds for an alert condition", + "sections": "Alert conditions", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5ea0617064441ff137912311" + "id": "5f2d847c64441fc0a656a98a" }, { - "category_2": "Cloud adoption", - "nodeid": 16176, + "category_2": "New Relic One pricing and users", + "nodeid": 39496, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Optimize your cloud spend", - "1. Deploy the New Relic Infrastructure agent", - "2. Create dashboard charts for cloud performance", - "3. Configure the Amazon AWS integration", - "4. Set up billing budgets in AWS", - "5. Add cloud spend and budget widgets to Insights dashboard", - "6. Create dashboards for every level of your organization", - "7. Set up alerts", + "Accounts and billing", + "Account setup", + "Account structure", + "New Relic One pricing and users", + "General account settings", + "Automated user management", + "Partner install", + "Query and alert on usage data", + "Data types", + "Query examples", + "Data usage queries", + "User count queries", + "Set usage alerts", + "General attributes", "For more help" ], - "title": "Optimize your cloud spend", - "category_0": "New Relic solutions", + "title": "Query and alert on usage data", + "category_0": "New Relic accounts", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", - "published_at": "2020-09-30T04:51:45Z", - "updated_at": "2020-09-27T22:50:50Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", + "category_1": "Accounts and billing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "published_at": "2020-10-03T15:47:18Z", + "updated_at": "2020-10-03T15:47:18Z", + "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", "document_type": "page", "popularity": 1, - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.18422, + "_score": 81.71813, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" + "title": "Query and alert on usage data", + "sections": "Query and alert on usage data", + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" }, - "id": "5f59fc5b196a672f27ce6a45" + "id": "5f22f5bd64441f0c9e2a48ea" } ], - "/build-apps/permission-manage-apps": [ + "/build-apps/build-hello-world-app": [ { - "category_2": "Original users and roles", - "nodeid": 1101, "sections": [ - "Original accounts and billing", - "Original product-based pricing", - "Original users and roles", - "SAML SSO (original users)", - "Original data retention", - "Original pricing plan usage", - "Users and roles (original user model)", - "View and manage users", - "User types: basic user and full user", - "Account roles", - "Add-on roles", - "Account permissions", - "Alert permissions", - "APM permissions", - "Browser permissions", - "Infrastructure permissions", - "Insights permissions", - "Mobile permissions", - "Synthetics permissions", - "Workloads", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Users and roles (original user model)", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Original accounts and billing", - "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", - "published_at": "2020-09-30T12:07:10Z", - "updated_at": "2020-09-24T08:31:54Z", - "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-03T13:52:21Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. The Owner can also install and configure the New Relic agent, and they can enable or set up features. Admins One or more individuals who can add, edit, and delete account users. Admins can also install and configure the New Relic agent, and they can enable or set up features. Users One or more individuals who use (and optionally set up) the available New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted Users One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Mobile. To allow a User or Restricted User to execute any of these functions in New Relic Mobile, assign a Mobile manager role. Admin and manager capabilities for Mobile include: Delete a mobile application from New Relic. Install New Relic Mobile for Android or iOS. Synthetics permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.63314, + "_score": 196.23344, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Account permissions", - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": " a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" }, - "id": "5f3e194028ccbc18c7f56de3" + "id": "5efa989e28ccbc4071307de5" }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", + "title": "Nerdpack file structure", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-03T13:53:28Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 93.26297, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Build apps", - "sections": "Permissions for managing applications", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" - }, - "id": "5efa999d64441fc0f75f7e21" - }, - { - "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", - "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", - "sections": [ - "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "About this Learncast", - "Prerequisites", - "Virtual Training Session List" - ], - "published_at": "2020-10-02T02:01:40Z", - "title": "Live Learncast: New Relic One Programmability", - "updated_at": "2020-07-31T01:40:49Z", - "type": "", - "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", - "popularity": 1, - "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.22455, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" - }, - "id": "5dc618cbe7b9d2a0a8e4649c" - }, - { - "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" - ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" - ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-02T02:05:55Z", - "document_type": "page", - "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 79.00232, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Add images and metadata to your apps", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" - }, - "id": "5efa999de7b9d283e67bab8f" - }, - { - "image": "https://newrelic.com/dam/new-relic/opengraph/newrelic_og_image.png", - "url": "https://newrelic.com/resources/webinars/NR-One-Programmability-191126", - "sections": [ - "During this session we will review the following topics:", - "Related Links", - "COMPANY", - "CONNECT", - "international" - ], - "published_at": "2020-09-30T03:35:05Z", - "title": "New Relic One Programmability Online Training", - "updated_at": "2020-09-03T03:22:32Z", - "type": "storefront", - "external_id": "f583edb88ca2d2430ca297364eac839705311616", - "popularity": 1, - "body": "logo-newrelic Search Products Pricing Solutions Help Center About New Relic for iOS or Android    New Relic Insights App for iOS Search icon Sign Up Log In Products New Relic One Platform Overview Telemetry Data Platform Full-Stack Observability Applied Intelligence Solutions By Topic DevOps Cloud Adoption Cloud Native Digital Customer Experience By Industry E-commerce and Retail Media Public Sector By Technology Amazon Web Services Pivotal Cloud Foundry Microsoft Azure Google Cloud Platform Kubernetes Help Center Learn Docs Build on New Relic Explore open source projects Training Get help Community forum Global technical support Expert services About Our Customers Over 17,000 customers love New Relic, from Fortune 500 enterprises to small businesses around the globe. Our Blog The latest news, tips, and insights from the world of New Relic and digital intelligence. Our Company About Us Leadership Meetups and Events Resources   Investor Relations Newsroom Partner Program Contact Us logo-newrelic Want to use our logo? There's a page for that, including instructions and different styles and formats. Sorry about grabbing your right-click. Just trying to be helpful. You can also go home. Back to top icon Video New Relic One Programmability Online Training 46:59   Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably. Prerequisites This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests JavaScript layouts   During this session we will review the following topics: Installation of New Relic CLI and Environment setup Familiarisation with New Relic One Application component model and lifecycle Advanced UI construction and data processing Individual self paced experimentation and Open Source example deployment Request a Demo Related Links Case Study La plus grande brasserie au monde se tourne vers New Relic pour que la bière continue de couler à flots dans l’ère numérique Webinar Introduction to Custom Apps on New Relic One eBook Understanding the 3 Phases of DevOps Maturity Article Black Friday Is Coming: Are Your Sites and Apps Ready? eBook DevOps – so geht es richtig : Best Practices zur Überwindung von Erfolgshindernissen eBook DevOps Done Right: Best Practices to Knock Down Barriers to Success eBook Creating a Framework for Digital Media Success Article 7 Requirements for Monitoring Cloud Apps and Infrastructure COMPANY Careers and Culture Partner Program Investor Relations NewRelic.org Suppliers Portal CONNECT Contact Us Request Demo Events international newrelic.co.jp (日本語) newrelic.fr (Français) newrelic.de (Deutsch) newrelic.co.kr (한국어) Terms of Service DMCA Policy Privacy Policy Cookie Policy UK Slavery Act of 2015 ©2008-20 New Relic, Inc. All rights reserved", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 75.32549, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": "; this training will provide important context to start you on the journey of developing New Relic Applications.  Must have: Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager role to deploy Technical exercises include exposure" - }, - "id": "5ece92cb28ccbc3012c1356a" - } - ], - "/build-apps/build-hello-world-app": [ - { - "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-02T02:19:13Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 197.56372, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" - }, - "id": "5efa989e28ccbc4071307de5" - }, - { - "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" - ], - "title": "Nerdpack file structure", - "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-02T02:17:56Z", - "updated_at": "2020-08-14T01:49:25Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 183.74179, + "_score": 180.62155, "_version": null, "_explanation": null, "sort": null, @@ -5062,7 +4744,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:21Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5073,7 +4755,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 156.30869, + "_score": 155.39194, "_version": null, "_explanation": null, "sort": null, @@ -5126,7 +4808,7 @@ "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-02T02:15:05Z", + "published_at": "2020-10-03T13:47:57Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -5134,7 +4816,7 @@ "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 139.76091, + "_score": 137.73895, "_version": null, "_explanation": null, "sort": null, @@ -5161,7 +4843,7 @@ "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", "image": "", "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-02T02:13:50Z", + "published_at": "2020-10-03T13:46:53Z", "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, @@ -5169,7 +4851,7 @@ "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 106.85573, + "_score": 104.565094, "_version": null, "_explanation": null, "sort": null, @@ -5183,508 +4865,455 @@ "id": "5f45bf2864441ffb4dfdcdbb" } ], - "/build-apps/set-up-dev-env": [ + "/build-apps/permission-manage-apps": [ { + "category_2": "Original users and roles", + "nodeid": 1101, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Original accounts and billing", + "Original product-based pricing", + "Original users and roles", + "SAML SSO (original users)", + "Original data retention", + "Original pricing plan usage", + "Users and roles (original user model)", + "View and manage users", + "User types: basic user and full user", + "Account roles", + "Add-on roles", + "Account permissions", + "Alert permissions", + "APM permissions", + "Browser permissions", + "Infrastructure permissions", + "Insights permissions", + "Mobile permissions", + "Synthetics permissions", + "Workloads", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Users and roles (original user model)", + "category_0": "New Relic accounts", + "type": "docs", + "category_1": "Original accounts and billing", + "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", + "published_at": "2020-10-03T17:04:51Z", + "updated_at": "2020-10-03T17:04:51Z", + "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 244.74277, + "_score": 184.23627, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "sections": "Account permissions", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f3e194028ccbc18c7f56de3" }, { - "category_2": "Trace API", - "nodeid": 35381, + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "Distributed tracing", + "Amazon integrations", "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", + "AWS integrations list", "Troubleshooting", - "Report traces via the Trace API (New Relic format)", - "Example: Use your tool’s native sampling", - "Example: Use Infinite Tracing", - "JSON requirements and recommendations", - "Attributes", - "Required attributes", - "Highly recommended attributes", - "Reserved attributes", - "Other attributes", - "Explore more about distributed tracing:", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", "For more help" ], - "title": "Report traces via the Trace API (New Relic format)", - "category_0": "Understand dependencies", + "title": "Integrations and managed policies", + "category_0": "Integrations", "type": "docs", - "category_1": "Distributed tracing", - "external_id": "ba16f3a71b78e24c23da821b64567398251bb217", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-new-relic-format-traces-trace-api", - "published_at": "2020-09-30T17:57:42Z", - "updated_at": "2020-09-30T17:57:42Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 136.3678, + "_score": 125.095314, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report traces via the Trace API (New Relic format)", - "sections": "Report traces via the Trace API (New Relic format)", - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "category_2": "Trace API", - "body": " an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H "Content", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API" + "title": "Integrations and managed policies", + "sections": "Option 2: Manually add permissions", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" }, - "id": "5d89dc6028ccbc83ce9cb16f" + "id": "5d6c1f4828ccbce6928f6fe0" }, { - "category_2": "Enable and configure", - "nodeid": 38171, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-09-30T14:39:10Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.62956, + "_score": 91.96977, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Trace API", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using" + "title": "Build apps", + "sections": "Permissions for managing applications", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" }, - "id": "5ea0617064441ff137912311" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Enable log monitoring", - "nodeid": 34686, + "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", + "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Fluent Bit plugin for log forwarding", - "Compatibility and requirements", - "Enable Fluent Bit for log management", - "Recommended usage", - "Install the Fluent Bit plugin", - "Configure the Fluent Bit plugin", - "Test the Fluent Bit plugin", - "Optional: Configure plugin attributes", - "Plugin configuration", - "View log data", - "What's next?", - "For more help" + "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "About this Learncast", + "Prerequisites", + "Virtual Training Session List" ], - "title": "Fluent Bit plugin for log forwarding", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "b32bba2a148de0353e819ce82c14d16acfcab068", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/fluent-bit-plugin-log-forwarding", - "published_at": "2020-09-30T18:47:06Z", - "updated_at": "2020-09-27T21:53:23Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", - "document_type": "page", + "published_at": "2020-10-03T13:40:04Z", + "title": "Live Learncast: New Relic One Programmability", + "updated_at": "2020-07-31T01:40:49Z", + "type": "", + "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", "popularity": 1, - "info": "A description of New Relic's Fluent Bit logging plugin, and how to install it and configure it. ", - "body": "New Relic offers a Fluent Bit output plugin to connect your Fluent Bit monitored log data to New Relic. Read on to learn how to enable this feature. Compatibility and requirements To use New Relic Logs with Fluent Bit, ensure your configuration meets the following requirements: New Relic license key (recommended) or Insert API key Fluent Bit 0.12 or higher is supported; however, version 1.0 or higher is recommended. Enable Fluent Bit for log management To forward your logs to New Relic using Fluent Bit: Install the Fluent Bit plugin. Configure the Fluent Bit plugin. Test the Fluent Bit plugin. Generate some traffic and wait a few minutes, then check your account for data. Recommended usage We have published a container with the plugin installed. It serves as a base image to be used by our Kubernetes integration. We recommend you use this base image and layer your own custom configuration files. Install the Fluent Bit plugin To install the Fluent Bit plugin: Navigate to New Relic's Fluent Bit plugin repository on GitHub. From the repository page, clone or download the repository. Run the following command to build your plugin: cd newrelic-fluent-bit-output && make all Configure the Fluent Bit plugin Fluent Bit needs to know the location of the New Relic plugin and the New Relic license key (recommended) or Insert API key to output data to New Relic. To configure your Fluent Bit plugin: Pay attention to white space when editing your config files. Be sure to use four spaces to indent and one space between keys and values. Locate or create a plugins.conf file in your plugins directory. In the plugins.conf file, add a reference to out_newrelic.so, adjacent to your fluent-bit.conf file: [PLUGINS] Path /PATH/TO/newrelic-fluent-bit-output/out_newrelic.so In the fluent-bit.conf file, add the following line under the service block: [SERVICE] # This is the main configuration block for fluent bit. # Ensure the follow line exists somewhere in the SERVICE block Plugins_File plugins.conf At the bottom of the fluent-bit.conf file, add the following to set up the input and output filters. Replace the placeholder text with your New Relic license key (recommended) or Insert API key: [INPUT] Name tail Path /PATH/TO/YOUR/LOG/FILE [OUTPUT] Name newrelic Match * licenseKey YOUR_LICENSE_KEY # Optional maxBufferSize 256000 maxRecords 1024 Restart your Fluent Bit instance with the following command: fluent-bit -c /PATH/TO/fluent-bit.conf Test the Fluent Bit plugin To test if your Fluent Bit plugin is receiving input from a log file: Run the following command to append a test log message to your log file: echo \"test message\" >> /PATH/TO/YOUR/LOG/FILE Search New Relic Logs UI for test message. Optional: Configure plugin attributes Plugin configuration Once you have installed and configured the Fluent Bit plugin, you can use the following attributes to configure how the plugin sends data to New Relic: Key Description licenseKey The New Relic license key. Use either licenseKey (recommended) or apiKey, not both. Default: none maxBufferSize The maximum size the payloads sent, in bytes. Default: 256000 maxRecords The maximum number of records to send at a time. Default: 1024 apiKey New Relic's Insert API key. Use either licenseKey (recommended) or apiKey, not both. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 124.62242, + "_score": 90.47085, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Fluent Bit logging plugin, and how to install it and configure it. ", - "body": " key (recommended) or Insert API key Fluent Bit 0.12 or higher is supported; however, version 1.0 or higher is recommended. Enable Fluent Bit for log management To forward your logs to New Relic using Fluent Bit: Install the Fluent Bit plugin. Configure the Fluent Bit plugin. Test the Fluent Bit plugin" + "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" }, - "id": "5f375ef4196a6743b655e634" + "id": "5dc618cbe7b9d2a0a8e4649c" }, { "sections": [ - "Add tables to your New Relic One application", + "Serve, publish, and deploy your New Relic One app", "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "Add tables to your New Relic One application", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-02T02:16:28Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-03T13:47:59Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.37394, + "_score": 79.04379, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Add images and metadata to your apps", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5efa999de7b9d283e67bab8f" } ], - "/build-apps/add-nerdgraphquery-guide": [ + "/automate-workflows/kubernetes-helm-deployment": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:46:53Z", + "title": "Automate workflows", + "updated_at": "2020-10-03T02:03:43Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 756.25995, + "_score": 6298.5215, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa999c196a67dfb4766445" }, { + "category_2": "Enable log monitoring", + "nodeid": 34166, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Kubernetes plugin for log forwarding", + "Requirements", + "Enable Kubernetes for logs management", + "View log data", + "What's next?", + "For more help" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-02T02:15:05Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Kubernetes plugin for log forwarding", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", + "published_at": "2020-09-30T15:46:39Z", + "updated_at": "2020-09-27T16:17:57Z", + "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 382.0512, + "_score": 123.78511, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Query your browser data", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + "sections": "New Relic Logs", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" }, - "id": "5efa993c196a67066b766469" + "id": "5f37c1d064441f0d21a0a5e1" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "category_2": "Private locations", + "nodeid": 23821, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Install containerized private minions (CPMs)", + "General private minion features", + "Kubernetes-specific features", + "System requirements and compatibility", + "Private location key", + "Sandboxing and Docker dependencies", + "Install and update CPM versions", + "Start the CPM", + "Stop or delete the CPM", + "Show help and examples", + "Show license information", + "Configure CPM", + "Networks", + "Security, sandboxing, and running as non-root", + "Docker image repository", + "Additional considerations for CPM connection", "For more help" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", + "title": "Install containerized private minions (CPMs)", + "category_0": "Synthetic monitoring", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "category_1": "Synthetic monitoring", + "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", + "published_at": "2020-10-04T00:01:41Z", + "updated_at": "2020-08-13T23:22:19Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 316.34402, + "_score": 115.53432, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "sections": "Using monitors", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5f31d981196a678103fbd731" }, { - "category_2": "UI and data", - "nodeid": 38701, + "category_2": "Enable and configure", + "nodeid": 38171, "sections": [ - "Log management", + "Distributed tracing", "Get started", - "Enable Logs", + "Enable and configure", + "Other requirements", "UI and data", - "Log API", + "Trace API", "Troubleshooting", - "Drop data with drop filter rules", - "Why it matters", - "How drop filter rules work", - "Create drop filter rules", - "Types of drop filter rules", - "Drop log events", - "Drop attributes", - "Cautions when dropping data", - "Delete drop filter rules", + "Integrations: Enable distributed tracing", + "Step 1. Install the integration", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. (Infinite Tracing) Configure the integration", + "Step 4. View traces", "For more help" ], - "title": "Drop data with drop filter rules ", - "category_0": "Log management", + "title": "Integrations: Enable distributed tracing", + "category_0": "Understand dependencies", "type": "docs", - "category_1": "Log management ", - "external_id": "054102731b07bea12e6877a2314f4114139b1a72", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-logs-create-drop-filter.png", - "url": "https://docs.newrelic.com/docs/logs/log-management/ui-data/drop-data-drop-filter-rules", - "published_at": "2020-09-30T14:55:23Z", - "updated_at": "2020-09-24T10:19:45Z", - "breadcrumb": "Contents / Log management / Log management / UI and data", + "category_1": "Distributed tracing", + "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", + "published_at": "2020-09-30T14:39:10Z", + "updated_at": "2020-09-30T14:39:10Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", "document_type": "page", "popularity": 1, - "info": "Data retention information for New Relic's log management and logs in context.", - "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when deciding to drop data. The data you drop is not recoverable. Before using this feature, review Responsibilities and considerations. Why it matters Drop filter rules help you accomplish some very important goals: You lower costs by storing only logs relevant to your account. You protect privacy and security by removing personal identifiable information (PII). You reduce noise by removing irrelevant events and attributes. How drop filter rules work A drop filter rule matches data based on a query. When triggered, the drop filter rule removes the matching data from the ingestion pipeline before it is written to in NRDB. Since the data does not reach the backend, it cannot be queried: the data is gone and cannot be restored. During the ingestion process, log data can be parsed, transformed, or dropped before being stored. Create drop filter rules You must have admin permissions in New Relic to create and edit drop filters, or be a member of a role with create and edit permissions for Logging Parsing Rules. Drop filter rules can be created from one.newrelic.com > Logs using new or existing log queries. To create a new drop filter rule: Filter or query to the specific set of logs which contain the data to be dropped. Once the query is active, click on the + button to show the query options and select Create a new drop filter. You can choose to either drop the entire log event that matches the query or just a specific subset of attributes in the matching events. Save the drop filter rule. Before saving the rule, consider changing its name. Once a drop filter rule is active, it's applied to all log events ingested from that point onwards. Rules are not applied retroactively: logs collected prior to the creation of a rule are not filtered by that rule. Types of drop filter rules Drop log events The default type of drop filter rule is to drop logs. This option drops the entire log events that match the filter query. When creating a rule try to provide a specific query that only matches log data which should be dropped. New Relic won't let you create drop filter rules without values in the matching query: this prevents badly formed rules from dropping all log data. Drop attributes You can specify attributes to be dropped in a log event that matches your query. At least one or more attributes must be selected. Any attribute which is selected will be dropped; all remaining attributes will be kept and stored in NRDB. We recommend this method for removing fields which could contain personal identifiable information (PII) or other sensitive attributes without losing valuable monitoring data. ​ Cautions when dropping data When creating drop rules, you are responsible for ensuring that the rules accurately identify and discard the data that meets the conditions that you have established. You are also responsible for monitoring the rule, as well as the data you disclose to New Relic. New Relic cannot guarantee that this functionality will completely resolve data disclosure concerns you may have. New Relic does not review or monitor how effective the rules you develop are. Creating rules about sensitive data can leak information about what kinds of data you maintain, including the format of your data or systems (for example, through referencing email addresses or specific credit card numbers). Rules you create, including all information in those rules, can be viewed and edited by any user with the relevant role-based access control permissions. Delete drop filter rules Drop filter rules can be deleted from one.newrelic.com > Logs. To delete a drop filter rule: Click on the + button to show the query options and select View all drop filters. Click the delete [trash icon] icon next to the drop filter rule you want to remove. Once deleted, rules no longer filter ingested log events. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 274.55902, + "_score": 106.641785, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Drop data with drop filter rules ", - "sections": "Drop data with drop filter rules", - "info": "Data retention information for New Relic's log management and logs in context.", - "category_2": "UI and data", - "body": "After log event data has been shipped to New Relic, it can either be stored in our database (NRDB) or dropped (discarded). New Relic can drop both log events and event attributes via drop filter rules. You can manage drop filter rules using New Relic's log management or NerdGraph. Use caution when", - "breadcrumb": "Contents / Log management / Log management / UI and data" + "sections": "Step 2. (Infinite Tracing) Set up a trace observer", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" }, - "id": "5f37d6fb196a67021c55e5eb" + "id": "5ea0617064441ff137912311" }, { - "category_2": "Alert conditions", - "nodeid": 9231, + "category_2": "Cloud adoption", + "nodeid": 16176, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Optimize your cloud spend", + "1. Deploy the New Relic Infrastructure agent", + "2. Create dashboard charts for cloud performance", + "3. Configure the Amazon AWS integration", + "4. Set up billing budgets in AWS", + "5. Add cloud spend and budget widgets to Insights dashboard", + "6. Create dashboards for every level of your organization", + "7. Set up alerts", "For more help" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", + "title": "Optimize your cloud spend", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "category_1": "New Relic solutions", + "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", + "published_at": "2020-10-03T21:33:08Z", + "updated_at": "2020-09-27T22:50:50Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 274.2721, + "_score": 103.85382, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Sum of query results (limited or intermittent data)", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" + "sections": "New Relic solutions", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5f59fc5b196a672f27ce6a45" } ], "/explore-docs/query-and-store-data": [ @@ -5708,7 +5337,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-02T02:16:27Z", + "published_at": "2020-10-03T13:51:17Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -5716,7 +5345,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 140.70593, + "_score": 138.87254, "_version": null, "_explanation": null, "sort": null, @@ -5750,7 +5379,7 @@ "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", "image": "", "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", - "published_at": "2020-09-30T11:38:32Z", + "published_at": "2020-10-03T17:31:36Z", "updated_at": "2018-04-14T23:39:35Z", "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", "document_type": "release_notes", @@ -5759,7 +5388,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 47.135986, + "_score": 47.11972, "_version": null, "_explanation": null, "sort": null, @@ -5804,7 +5433,7 @@ "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", "image": "", "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "published_at": "2020-09-30T11:30:28Z", + "published_at": "2020-10-03T17:13:08Z", "updated_at": "2020-09-03T11:06:02Z", "breadcrumb": "Contents / APM agents / Java agent / API guides", "document_type": "page", @@ -5813,7 +5442,7 @@ "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 33.247032, + "_score": 33.186462, "_version": null, "_explanation": null, "sort": null, @@ -5855,7 +5484,7 @@ "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", "image": "", "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", - "published_at": "2020-09-30T11:16:38Z", + "published_at": "2020-10-03T17:22:37Z", "updated_at": "2019-09-30T22:55:59Z", "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", "document_type": "api_doc", @@ -5864,7 +5493,7 @@ "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 26.395432, + "_score": 26.454775, "_version": null, "_explanation": null, "sort": null, @@ -5903,7 +5532,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 17.448376, + "_score": 17.564232, "_version": null, "_explanation": null, "sort": null, @@ -5913,260 +5542,50 @@ "id": "5c52cbec8e9c0f0b286080ec" } ], - "/collect-data/query-data-nrql": [ + "/explore-docs/nerdpack-file-structure": [ { - "category_2": "Alert conditions", - "nodeid": 9231, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-21T01:45:19Z", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.73608, + "_score": 419.8947, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "NRQL alert syntax", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "Nerdpack file structure", + "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5efa9973196a67d16d76645c" }, - { - "category_2": "Custom events", - "nodeid": 13661, - "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" - ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-09-30T07:36:03Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", - "document_type": "page", - "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 130.47174, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Event data sources", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" - }, - "id": "59f4354f4bb81c2ea8b80d0a" - }, - { - "category_2": "Get started", - "nodeid": 11431, - "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Introduction to NRQL, New Relic's query language", - "What is NRQL?", - "Where can you use NRQL?", - "What data can you query with NRQL?", - "Start using NRQL", - "NRQL query examples", - "NRQL syntax", - "For more help" - ], - "title": "Introduction to NRQL, New Relic's query language", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "published_at": "2020-09-30T12:11:32Z", - "updated_at": "2020-09-24T08:40:20Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", - "document_type": "page", - "popularity": 1, - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 128.53244, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Introduction to NRQL, New Relic's query language", - "sections": "What data can you query with NRQL?", - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" - }, - "id": "5f2abd47196a67747343fbe1" - }, - { - "category_2": "NRQL query tutorials", - "nodeid": 36916, - "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", - "For more help" - ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-09-30T16:27:58Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", - "document_type": "page", - "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.669556, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" - }, - "id": "5f2b1349196a67379343fbcf" - }, - { - "category_2": "Ingest APIs", - "nodeid": 35526, - "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Metric API limits and restricted attributes", - "Endpoint requirements and maximum limits", - "Rate limit violations", - "Restricted attributes", - "For more help" - ], - "title": "Metric API limits and restricted attributes", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", - "published_at": "2020-09-30T16:59:39Z", - "updated_at": "2020-09-27T21:34:10Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", - "document_type": "page", - "popularity": 1, - "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", - "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 50k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 50k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 80.76111, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Ingest and manage data", - "category_0": "Telemetry Data Platform", - "category_1": "Ingest and manage data", - "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" - }, - "id": "5f24e4ede7b9d28743c8231c" - } - ], - "/explore-docs/nr1-plugins": [ { "sections": [ "New Relic One CLI reference", @@ -6189,7 +5608,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6197,52 +5616,79 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 244.5633, + "_score": 333.48828, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", + "sections": "New Relic One CLI reference", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, "id": "5efa989e28ccbc535a307dd0" }, { "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "New Relic CLI Reference", + "title": "Map page views by region in a custom app", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-08-14T01:47:12Z", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-03T13:47:57Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.87393, + "_score": 300.77844, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "sections": "Import additional modules from New Relic One", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5efa993c196a67066b766469" }, { "image": "", @@ -6268,7 +5714,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:21Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6279,159 +5725,58 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.50067, + "_score": 284.87396, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" - }, - "id": "5f28bd6ae7b9d267996ade94" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", - "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" - ], - "published_at": "2020-10-02T02:10:51Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", - "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 109.99419, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ - "Quickly tag a set of resources", + "Set up your development environment", "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", + "A note on support", "Tip", - "Next steps" + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Quickly tag a set of resources", + "title": "Set up your development environment", "type": "developer", "tags": [ - "tags", - "new relic CLI" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-14T01:45:08Z", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-03T13:46:53Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 107.2319, + "_score": 275.07535, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Install the New Relic CLI", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "tags": "New Relic One CLI", + "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5efa9973e7b9d242237bab39" } ], - "/explore-docs/nerdpack-file-structure": [ - { - "sections": [ - "Create a \"Hello, World!\" application", - "Before you begin", - "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" - ], - "title": "Create a \"Hello, World!\" application", - "type": "developer", - "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" - ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-21T01:45:19Z", - "document_type": "page", - "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 421.19516, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "Nerdpack file structure", - "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" - }, - "id": "5efa9973196a67d16d76645c" - }, + "/explore-docs/nr1-config": [ { "sections": [ "New Relic One CLI reference", @@ -6454,7 +5799,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6462,79 +5807,108 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 344.31723, + "_score": 242.03209, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { + "category_2": "Troubleshooting", + "nodeid": 13726, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 180.46175, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" + }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-02T02:15:05Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 303.99692, + "_score": 154.66888, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Import additional modules from New Relic One", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5efa993c196a67066b766469" + "id": "5efa989ee7b9d2024b7bab97" }, { "image": "", @@ -6560,7 +5934,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:21Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6571,15 +5945,15 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 285.90182, + "_score": 120.91361, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, "id": "5f28bd6ae7b9d267996ade94" }, @@ -6603,7 +5977,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-02T02:13:49Z", + "published_at": "2020-10-03T13:46:53Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -6611,238 +5985,241 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 282.62482, + "_score": 115.207825, "_version": null, "_explanation": null, "sort": null, "highlight": { "tags": "New Relic One CLI", - "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, "id": "5efa9973e7b9d242237bab39" } ], - "/explore-docs/intro-to-sdk": [ + "/explore-docs/nr1-subscription": [ { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-02T02:16:27Z", - "title": "Build apps", - "updated_at": "2020-10-02T02:16:27Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 874.2538, + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 244.74121, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa989e28ccbc535a307dd0" }, { + "nodeid": 37686, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "AWS Lambda monitoring", + "Get started", + "Enable Lambda monitoring", + "UI and data", + "Troubleshooting", + "Update serverless monitoring for AWS Lambda", + "Update our Lambda integration via CLI", + "Update Layers via CLI", + "Update a manual Serverless Application Repository install", + "Enabling log management", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "Update serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", + "type": "docs", + "category_1": "AWS Lambda monitoring", + "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", + "published_at": "2020-10-03T16:24:33Z", + "updated_at": "2020-09-24T13:54:59Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "How to update our Serverless monitoring for AWS Lambda. ", + "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 678.8705, + "_score": 138.17293, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "sections": "Update our Lambda integration via CLI", + "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f6ca534196a67b08750423e" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32786, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Migrate to microservices", - "1. Deploy instrumentation on all application tiers and components", - "2. Use key metrics to identify components that you can migrate to microservices", - "3. Use deployment markers to establish app performance baselines", - "4. Implement the new microservice-based architecture, and measure the success of your application development processes", - "5. Create a dashboard to monitor KPIs", - "6. Create a new baseline to use for comparisons", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Migrate to microservices ", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", - "published_at": "2020-09-30T16:52:11Z", - "updated_at": "2020-09-27T20:33:59Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 625.5879, + "_score": 129.05934, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "1. Deploy instrumentation on all application tiers and components", - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f58347e64441f8c45e0684c" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Measure DevOps success", - "nodeid": 16416, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Establish objectives and baselines: define team SLOs", - "Service level components", - "Resources", - "1. Build an inventory of services requiring SLOs", - "2. Research customer expectations for SLOs", - "3. Define SLOs", - "4. Determine what can be instrumented", - "5. Review the default metrics", - "6. Set up custom instrumentation", - "7. Create Insights dashboards to track SLIs", - "For more help" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Establish objectives and baselines: define team SLOs", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "c51fb6972a0e1d7cd72eaea21310026ec5ddb6a4", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/catalyst-establish-objectives-2.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/establish-objectives-baselines-define-team-slos", - "published_at": "2020-09-30T05:46:14Z", - "updated_at": "2020-09-28T00:26:46Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "published_at": "2020-10-03T13:52:21Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", - "body": "A DevOps transformation requires a cultural shift so that teams can build new skills and motivations for the type of cross-team work required in a true DevOps practice. The transformation can be difficult when the people involved do not see the benefits of change as a clear objective. Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared. They also provide clear boundaries on service expectations that help teams achieve greater velocity and freedom in experimenting with new approaches. This tutorial defines SLOs for successful service delivery objectives and utilize New Relic instrumentation to surface the current performance metrics relative to those objectives. Measurable SLOs and visibility into your current progress against those SLOs ensure that you will be able to properly assess future optimization efforts. Service level components An SLO is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI); for example: Average response time Response time percentile Application availability SLOs clarify a target value for SLIs; for example: Average response time should be less than 200 ms 95% of requests should be completed within 250 ms Availability of the service should be 99.99% Logically group SLOs together to provide an overall boolean indicator of whether or not the service is meeting expectations. For example, a helpful SLO for alerting purposes could be: 95% of requests completed within 250 ms AND availability is 99.99% Service level components Example values SLI (Indicator) HTTP status codes SLO (Objective) < 1% HTTP 500s over 30 days SLA (Agreement) For every additional .1% of HTTP 500s, 5% refund of total contract Resources Value stream mapping can be a useful exercise to work through before setting SLOs. Work with your teams to clarify key components of your service and the appropriate metrics. Use these inputs as starting points for this tutorial. In addition: Learn about SLOs, SLIs, and SLAs from the Google Cloud Platform blog. Learn how New Relic has applied SLOs and SLIs into its reliability practices form this SREcon18 Americas presentation (approximately 21 minutes). 1. Build an inventory of services requiring SLOs Start defining SLOs for your application by first taking an inventory of the services that your application provides to both your internal and external customers. Draft a list of services. Make the scope of services you consider as comprehensive as possible. Engage your team members and other stakeholders to validate the list for completeness. Segment your application stack to understand the potential components that might require SLOs. For example, most applications can be segmented as: Application (backend/microservices) Dependency services (such as the message queue) Database Website Underlying servers This example lists components that would benefit from SLOs: Customer type Component name Owner Language stack Operating system External Service 1 John D. Java RHEL 6 Internal Service 2 Jane A. .NET Win2003 R2 Internal ActiveMQ John D. Java AIX External Website Jane A. Classic ASP Win2000 Internal MS SQL Dave Z. n/a Win2003 R2 Building a definitive list of services that require an SLO can be challenging, because an application often consists of many endpoints with complex interdependencies. Begin your SLO journey with pragmatism. Start by defining a broader, simpler set of SLOs that are driven by what your customers care about most and what your team can control. As your teams better align around SLOs, you can then begin to fine-tune and add more complexity. 2. Research customer expectations for SLOs Once you have an inventory of services, begin to gather the information you need to define the SLOs for those services. Interviews with customers that depend on your services are often valuable for understanding service expectations. For example, to define SLOs for internal teams, New Relic, ask questions such as: If possible, can you broadly categorize the types of requests we can expect from you and your service? To what extent do you or your service depend on timely responses to requests? Are there requests for which response time is not critical? How does your service handle unavailable dependencies or data? What is the maximum amount of unavailable data that your service can handle? At what threshold does your service fail if a request takes too long? What are acceptable rates of errors? What would a SLA look like between our product and yours? Existing usage data can also be a helpful research input. 3. Define SLOs Using the research on customer expectations that you gathered, draft a focused set of SLOs. New Relic recommends setting SLOs against one or more of the following SLIs: Application availability percentage Average response time Response percentile Error rate Apdex value Also, consider instrumenting and tracking the following SLIs: Throughput (peak and trough) Database call count and duration DNS and SSL timing DOM processing and page rendering Mean-time-to-detection (MTTD) For a more comprehensive list of potential areas to measure, see Measuring DevOps. Recommendation: To determine if your application is performing to customer expectations: Consider combining multiple SLIs (for example, availability and response time) into one SLO. Aim to define a consistent set of conditions across all of the services in your list. Consult your team and stakeholders to validate that the SLOs you set are reasonable, consistently attainable (even if you are not currently meeting them), and aligned to customer expectations. After you finish this step, you should have a set of well-defined SLOs and SLIs. 4. Determine what can be instrumented Now you are ready to deploy agents or monitors to establish a performance baseline for the SLIs you created. With proper instrumentation in place, you will have visibility into the performance indicators that matter for your team and your customers. In addition, you will also have a clear understanding of how to meet your SLOs. Identify the service components your team will optimize. Verify which application tiers meet New Relic monitoring requirements. To ensure you have robust baselines from which to work, determine the level of instrumentation that is possible (or allowed) within your organization. There may be situations where instrumentation of the current on-premise environment is not viable. For example, firewalls with certain settings may not permit New Relic agents to transmit data. Recommendation: If the application has a web front end in these situations, use New Relic Synthetics. Synthetics offers non-agent monitoring while still providing the ability to establish a baseline. To instrument the example applications and components in this tutorial, use these New Relic products: New Relic products Customer type Component name Tier owner Language stack Server OS New Relic products External Service 1 John D. Java RHEL 6 APM, Infrastructure, Synthetics Internal Service 2 Jane A. .Net Win2003 R2 APM, Infrastructure Internal ActiveMQ John D. Java AIX APM, Plugins External Website Jane A. Classic ASP Win2000 Synthetics Internal MS SQL Dave Z. NA Win2003 R2 Infrastructure, On-host integration APM installation After reviewing the compatibility and requirements for New Relic APM, install the APM agent on your application stack. Steps for installing APM agents vary based on language agent type. Follow the installation procedures for specific APM agents. Infrastructure installation After reviewing the requirements for New Relic Infrastructure, follow the installation procedures to install the Infrastructure agent on instances that host your applications. The New Relic Infrastructure agent requires the following host permissions: Linux: To install and run the agent, you must have root privileges. Windows: To install and run the agent, you must have Administrator privileges. Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations based on their availability. New Relic supports several commonly used application components, including MySQL, Apache, NGINX, and more. For more information, see New Relic's on-host integrations documentation. Synthetics New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. Follow the procedures to create a simple browser check. Be sure to verify that your website URL is accessible from the Synthetics public network locations. Browser New Relic Browser provides deep insights into how your users are interacting with your application or website. Browser complements Synthetics with data based on actual user experiences, which is useful in discerning how DevOps efforts are ultimately improving the experience for the customer. For more information, see the compatibility and requirements, then install the New Relic Browser agent. Mobile The growing role of mobile apps in customer experience often spurs new performance data needs. Installation of New Relic Mobile lets DevOps teams instrument iOS and Android applications to gain a fuller understanding of service delivery quality. Plugins Developers can use the New Relic Plugins product to create plugins that monitor numerical metrics provided by external services, hosts, or equipment. You can install existing plugins from Plugin Central, or plan, develop, test, and create your own plugins. 5. Review the default metrics After you deploy the agents and monitors, use service maps to review the default metrics that New Relic captures. For example, a typical service map show many of the common SLIs that application teams rely on, including response time, Apdex, throughput, and error rate metrics from APM. It also shows page load time, Ajax response, throughput, and error rate from Browser. rpm.newrelic.com > Service maps: To explore detailed granularity for any area, use the service map's nodes. 6. Set up custom instrumentation To close any remaining gaps in visibility for your SLIs, use custom instrumentation. New Relic provides several avenues for adding custom instrumentation, including: Making API calls to agents from inside your source code Packaging XML-based custom instrumentation modules with deployed applications Adding UI-based instrumentation without a code deploy In addition, you can add custom attributes to each transaction event that match application performance factors to critical business information. Then you can track those attributes in Insights dashboards. For more information, see the custom instrumentation documentation for your application: APM Browser Infrastructure Insights Mobile Synthetics 7. Create Insights dashboards to track SLIs Once you implement the appropriate instrumentation, it is easy to visualize your service level indicators with New Relic Insights dashboards. Insights provides a single location to query and view all the data that New Relic products gather. For example, Insights helps visualize the following data gathered from New Relic products: Infrastructure: Use default Infrastructure events and attributes for your systems, processes, events, storage, and network; Infrastructure integrations; and custom attributes. APM: Use Transaction and TransactionError event types. Browser: Use PageView and PageAction event types. Mobile: Use several Mobile event types. Synthetics: Use SyntheticCheck, SyntheticRequest, and SyntheticPrivateMinion event types. Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your dashboards. Create dashboards that include widgets for the SLI baseline data. Use these widgets and dashboards to establish team dashboards that you can share and use to conduct operations reviews. insights.newrelic.com > (select a dashboard): Query your SLI baseline data, create dashboards with widgets to visualize the data, then share with your team and stakeholders.​ The metrics you capture will become your application's baseline. Share your Insights dashboard with your application team and stakeholders to provide visibility into what is happening with your application and to monitor future performance. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 612.11255, + "_score": 120.73436, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Establish objectives and baselines: define team SLOs", - "sections": "New Relic solutions", - "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": ". Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, - "id": "5f5b215064441f4c48e06825" + "id": "5f28bd6ae7b9d267996ade94" }, { + "category_2": "Troubleshooting", + "nodeid": 13726, "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" - ], - "title": "Add tables to your New Relic One application", - "type": "developer", - "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-02T02:16:28Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 594.58655, + "_score": 115.78702, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation." + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5e9af5ba28ccbc3d4fd94a21" } ], - "/explore-docs/nr1-catalog": [ + "/explore-docs/nr1-plugins": [ { "sections": [ "New Relic One CLI reference", @@ -6865,7 +6242,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", + "published_at": "2020-10-03T13:52:22Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6873,7 +6250,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 301.69614, + "_score": 240.98141, "_version": null, "_explanation": null, "sort": null, @@ -6882,50 +6259,43 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-02T02:09:27Z", - "title": "New Relic Developers", - "updated_at": "2020-10-02T01:51:38Z", + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 11 Days : 20 Hours : 29 Minutes : 42 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 198.58388, + "_score": 132.14163, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989ee7b9d2024b7bab97" }, { "image": "", @@ -6951,7 +6321,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-02T02:10:51Z", + "published_at": "2020-10-03T13:52:21Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6962,7 +6332,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 168.43677, + "_score": 120.91361, "_version": null, "_explanation": null, "sort": null, @@ -6975,312 +6345,1070 @@ "id": "5f28bd6ae7b9d267996ade94" }, { + "category_2": "Troubleshooting", + "nodeid": 13726, "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" ], - "title": "Serve, publish, and deploy your New Relic One app", + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 115.87947, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" + }, + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", + "sections": [ + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" + ], + "published_at": "2020-10-03T13:52:22Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 108.44229, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + }, + "id": "5f28bd6a64441f9817b11a38" + } + ], + "/explore-docs/intro-to-sdk": [ + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-09-02T02:05:55Z", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 140.54659, + "_score": 858.72314, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5efa999d64441fc0f75f7e21" }, { "sections": [ - "Create a \"Hello, World!\" application", - "Before you begin", - "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Create a \"Hello, World!\" application", + "title": "Intro to NerdStorage", "type": "developer", "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-02T02:13:49Z", - "updated_at": "2020-08-21T01:45:19Z", + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-03T13:51:17Z", + "updated_at": "2020-09-08T01:50:19Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 654.14984, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + }, + "id": "5efa989ee7b9d2048e7bab92" + }, + { + "category_2": "Getting started", + "nodeid": 7646, + "sections": [ + "New Relic APM", + "Getting started", + "Guides", + "Apdex", + "Maintenance", + "Troubleshooting", + "Introduction to APM", + "Why it matters", + "Monitor all aspects of your business", + "Ready to get started?", + "What's next?", + "For more help" + ], + "title": "Introduction to APM", + "category_0": "APM", + "type": "docs", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", + "image": "", + "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", + "published_at": "2020-10-03T14:46:24Z", + "updated_at": "2020-10-03T14:46:24Z", + "breadcrumb": "Contents / APM / New Relic APM / Getting started", + "document_type": "page", + "popularity": 1, + "info": "New Relic APM: an overview of its features and functionality.", + "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 640.3344, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "New Relic APM", + "info": "New Relic APM: an overview of its features and functionality.", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", + "breadcrumb": "Contents / APM / New Relic APM / Getting started" + }, + "id": "5f2dcb8a64441f3a1756a9e5" + }, + { + "category_2": "Optimize your cloud native environment", + "nodeid": 32786, + "sections": [ + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Migrate to microservices", + "1. Deploy instrumentation on all application tiers and components", + "2. Use key metrics to identify components that you can migrate to microservices", + "3. Use deployment markers to establish app performance baselines", + "4. Implement the new microservice-based architecture, and measure the success of your application development processes", + "5. Create a dashboard to monitor KPIs", + "6. Create a new baseline to use for comparisons", + "For more help" + ], + "title": "Migrate to microservices ", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", + "published_at": "2020-09-30T16:52:11Z", + "updated_at": "2020-09-27T20:33:59Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "document_type": "page", + "popularity": 1, + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 585.691, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "1. Deploy instrumentation on all application tiers and components", + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" + }, + "id": "5f58347e64441f8c45e0684c" + }, + { + "category_2": "Measure DevOps success", + "nodeid": 16416, + "sections": [ + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Establish objectives and baselines: define team SLOs", + "Service level components", + "Resources", + "1. Build an inventory of services requiring SLOs", + "2. Research customer expectations for SLOs", + "3. Define SLOs", + "4. Determine what can be instrumented", + "5. Review the default metrics", + "6. Set up custom instrumentation", + "7. Create Insights dashboards to track SLIs", + "For more help" + ], + "title": "Establish objectives and baselines: define team SLOs", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "c51fb6972a0e1d7cd72eaea21310026ec5ddb6a4", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/catalyst-establish-objectives-2.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/establish-objectives-baselines-define-team-slos", + "published_at": "2020-10-03T21:44:47Z", + "updated_at": "2020-09-28T00:26:46Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "document_type": "page", + "popularity": 1, + "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", + "body": "A DevOps transformation requires a cultural shift so that teams can build new skills and motivations for the type of cross-team work required in a true DevOps practice. The transformation can be difficult when the people involved do not see the benefits of change as a clear objective. Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared. They also provide clear boundaries on service expectations that help teams achieve greater velocity and freedom in experimenting with new approaches. This tutorial defines SLOs for successful service delivery objectives and utilize New Relic instrumentation to surface the current performance metrics relative to those objectives. Measurable SLOs and visibility into your current progress against those SLOs ensure that you will be able to properly assess future optimization efforts. Service level components An SLO is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI); for example: Average response time Response time percentile Application availability SLOs clarify a target value for SLIs; for example: Average response time should be less than 200 ms 95% of requests should be completed within 250 ms Availability of the service should be 99.99% Logically group SLOs together to provide an overall boolean indicator of whether or not the service is meeting expectations. For example, a helpful SLO for alerting purposes could be: 95% of requests completed within 250 ms AND availability is 99.99% Service level components Example values SLI (Indicator) HTTP status codes SLO (Objective) < 1% HTTP 500s over 30 days SLA (Agreement) For every additional .1% of HTTP 500s, 5% refund of total contract Resources Value stream mapping can be a useful exercise to work through before setting SLOs. Work with your teams to clarify key components of your service and the appropriate metrics. Use these inputs as starting points for this tutorial. In addition: Learn about SLOs, SLIs, and SLAs from the Google Cloud Platform blog. Learn how New Relic has applied SLOs and SLIs into its reliability practices form this SREcon18 Americas presentation (approximately 21 minutes). 1. Build an inventory of services requiring SLOs Start defining SLOs for your application by first taking an inventory of the services that your application provides to both your internal and external customers. Draft a list of services. Make the scope of services you consider as comprehensive as possible. Engage your team members and other stakeholders to validate the list for completeness. Segment your application stack to understand the potential components that might require SLOs. For example, most applications can be segmented as: Application (backend/microservices) Dependency services (such as the message queue) Database Website Underlying servers This example lists components that would benefit from SLOs: Customer type Component name Owner Language stack Operating system External Service 1 John D. Java RHEL 6 Internal Service 2 Jane A. .NET Win2003 R2 Internal ActiveMQ John D. Java AIX External Website Jane A. Classic ASP Win2000 Internal MS SQL Dave Z. n/a Win2003 R2 Building a definitive list of services that require an SLO can be challenging, because an application often consists of many endpoints with complex interdependencies. Begin your SLO journey with pragmatism. Start by defining a broader, simpler set of SLOs that are driven by what your customers care about most and what your team can control. As your teams better align around SLOs, you can then begin to fine-tune and add more complexity. 2. Research customer expectations for SLOs Once you have an inventory of services, begin to gather the information you need to define the SLOs for those services. Interviews with customers that depend on your services are often valuable for understanding service expectations. For example, to define SLOs for internal teams, New Relic, ask questions such as: If possible, can you broadly categorize the types of requests we can expect from you and your service? To what extent do you or your service depend on timely responses to requests? Are there requests for which response time is not critical? How does your service handle unavailable dependencies or data? What is the maximum amount of unavailable data that your service can handle? At what threshold does your service fail if a request takes too long? What are acceptable rates of errors? What would a SLA look like between our product and yours? Existing usage data can also be a helpful research input. 3. Define SLOs Using the research on customer expectations that you gathered, draft a focused set of SLOs. New Relic recommends setting SLOs against one or more of the following SLIs: Application availability percentage Average response time Response percentile Error rate Apdex value Also, consider instrumenting and tracking the following SLIs: Throughput (peak and trough) Database call count and duration DNS and SSL timing DOM processing and page rendering Mean-time-to-detection (MTTD) For a more comprehensive list of potential areas to measure, see Measuring DevOps. Recommendation: To determine if your application is performing to customer expectations: Consider combining multiple SLIs (for example, availability and response time) into one SLO. Aim to define a consistent set of conditions across all of the services in your list. Consult your team and stakeholders to validate that the SLOs you set are reasonable, consistently attainable (even if you are not currently meeting them), and aligned to customer expectations. After you finish this step, you should have a set of well-defined SLOs and SLIs. 4. Determine what can be instrumented Now you are ready to deploy agents or monitors to establish a performance baseline for the SLIs you created. With proper instrumentation in place, you will have visibility into the performance indicators that matter for your team and your customers. In addition, you will also have a clear understanding of how to meet your SLOs. Identify the service components your team will optimize. Verify which application tiers meet New Relic monitoring requirements. To ensure you have robust baselines from which to work, determine the level of instrumentation that is possible (or allowed) within your organization. There may be situations where instrumentation of the current on-premise environment is not viable. For example, firewalls with certain settings may not permit New Relic agents to transmit data. Recommendation: If the application has a web front end in these situations, use New Relic Synthetics. Synthetics offers non-agent monitoring while still providing the ability to establish a baseline. To instrument the example applications and components in this tutorial, use these New Relic products: New Relic products Customer type Component name Tier owner Language stack Server OS New Relic products External Service 1 John D. Java RHEL 6 APM, Infrastructure, Synthetics Internal Service 2 Jane A. .Net Win2003 R2 APM, Infrastructure Internal ActiveMQ John D. Java AIX APM, Plugins External Website Jane A. Classic ASP Win2000 Synthetics Internal MS SQL Dave Z. NA Win2003 R2 Infrastructure, On-host integration APM installation After reviewing the compatibility and requirements for New Relic APM, install the APM agent on your application stack. Steps for installing APM agents vary based on language agent type. Follow the installation procedures for specific APM agents. Infrastructure installation After reviewing the requirements for New Relic Infrastructure, follow the installation procedures to install the Infrastructure agent on instances that host your applications. The New Relic Infrastructure agent requires the following host permissions: Linux: To install and run the agent, you must have root privileges. Windows: To install and run the agent, you must have Administrator privileges. Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations based on their availability. New Relic supports several commonly used application components, including MySQL, Apache, NGINX, and more. For more information, see New Relic's on-host integrations documentation. Synthetics New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. Follow the procedures to create a simple browser check. Be sure to verify that your website URL is accessible from the Synthetics public network locations. Browser New Relic Browser provides deep insights into how your users are interacting with your application or website. Browser complements Synthetics with data based on actual user experiences, which is useful in discerning how DevOps efforts are ultimately improving the experience for the customer. For more information, see the compatibility and requirements, then install the New Relic Browser agent. Mobile The growing role of mobile apps in customer experience often spurs new performance data needs. Installation of New Relic Mobile lets DevOps teams instrument iOS and Android applications to gain a fuller understanding of service delivery quality. Plugins Developers can use the New Relic Plugins product to create plugins that monitor numerical metrics provided by external services, hosts, or equipment. You can install existing plugins from Plugin Central, or plan, develop, test, and create your own plugins. 5. Review the default metrics After you deploy the agents and monitors, use service maps to review the default metrics that New Relic captures. For example, a typical service map show many of the common SLIs that application teams rely on, including response time, Apdex, throughput, and error rate metrics from APM. It also shows page load time, Ajax response, throughput, and error rate from Browser. rpm.newrelic.com > Service maps: To explore detailed granularity for any area, use the service map's nodes. 6. Set up custom instrumentation To close any remaining gaps in visibility for your SLIs, use custom instrumentation. New Relic provides several avenues for adding custom instrumentation, including: Making API calls to agents from inside your source code Packaging XML-based custom instrumentation modules with deployed applications Adding UI-based instrumentation without a code deploy In addition, you can add custom attributes to each transaction event that match application performance factors to critical business information. Then you can track those attributes in Insights dashboards. For more information, see the custom instrumentation documentation for your application: APM Browser Infrastructure Insights Mobile Synthetics 7. Create Insights dashboards to track SLIs Once you implement the appropriate instrumentation, it is easy to visualize your service level indicators with New Relic Insights dashboards. Insights provides a single location to query and view all the data that New Relic products gather. For example, Insights helps visualize the following data gathered from New Relic products: Infrastructure: Use default Infrastructure events and attributes for your systems, processes, events, storage, and network; Infrastructure integrations; and custom attributes. APM: Use Transaction and TransactionError event types. Browser: Use PageView and PageAction event types. Mobile: Use several Mobile event types. Synthetics: Use SyntheticCheck, SyntheticRequest, and SyntheticPrivateMinion event types. Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your dashboards. Create dashboards that include widgets for the SLI baseline data. Use these widgets and dashboards to establish team dashboards that you can share and use to conduct operations reviews. insights.newrelic.com > (select a dashboard): Query your SLI baseline data, create dashboards with widgets to visualize the data, then share with your team and stakeholders.​ The metrics you capture will become your application's baseline. Share your Insights dashboard with your application team and stakeholders to provide visibility into what is happening with your application and to monitor future performance. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 576.2837, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Establish objectives and baselines: define team SLOs", + "sections": "New Relic solutions", + "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": ". Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" + }, + "id": "5f5b215064441f4c48e06825" + } + ], + "/build-apps/set-up-dev-env": [ + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-03T13:52:22Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 233.57695, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + }, + "id": "5efa989e28ccbc535a307dd0" + }, + { + "category_2": "Trace API", + "nodeid": 35381, + "sections": [ + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Report traces via the Trace API (New Relic format)", + "Example: Use your tool’s native sampling", + "Example: Use Infinite Tracing", + "JSON requirements and recommendations", + "Attributes", + "Required attributes", + "Highly recommended attributes", + "Reserved attributes", + "Other attributes", + "Explore more about distributed tracing:", + "For more help" + ], + "title": "Report traces via the Trace API (New Relic format)", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "external_id": "ba16f3a71b78e24c23da821b64567398251bb217", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-new-relic-format-traces-trace-api", + "published_at": "2020-10-03T22:14:29Z", + "updated_at": "2020-09-30T17:57:42Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API", + "document_type": "page", + "popularity": 1, + "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", + "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 126.97283, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Report traces via the Trace API (New Relic format)", + "sections": "Report traces via the Trace API (New Relic format)", + "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", + "category_2": "Trace API", + "body": " an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H "Content", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API" + }, + "id": "5d89dc6028ccbc83ce9cb16f" + }, + { + "category_2": "Enable and configure", + "nodeid": 17021, + "sections": [ + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Language agents: Enable distributed tracing", + "Step 1. Prerequisites", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. Configure the agents", + "Step 4. View traces", + "Manual instrumentation (If automatic instrumentation doesn't work)", + "For more help" + ], + "title": "Language agents: Enable distributed tracing", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", + "external_id": "92f81f3ba78006bec29baec46891cf6cfb1c9468", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", + "published_at": "2020-10-03T21:57:11Z", + "updated_at": "2020-10-03T21:57:11Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "document_type": "page", + "popularity": 1, + "info": "How to enable distributed tracing or Infinite Tracing for APM agents.", + "body": "Here's what you need to know for enabling either standard distributed tracing or Infinite Tracing with our language agents. If you want to get more background before getting started, check out these topics: How span sampling works explains distributed tracing options. Impacts to APM tells you what to expect if you are a current APM user. The process of enabling distributed tracing takes you through these steps: Meet the prerequisites (Infinite Tracing) Set up a trace observer Configure your agents View traces Step 1. Prerequisites Check the following sections to confirm that the distributed tracing options you want are available for your environment. Your main options are: Standard distributed tracing: Head-based sampling Infinite Tracing: Tail-based sampling Support for W3C Trace Context: Available in all Infinite Tracing agents and in standard distributed tracing agents as noted Once you find the agent version with the features you want, follow the links for help installing or updating your agent. For best results, update existing agents to the latest version. C SDK Install (compile) or update to the required C SDK version. For best results, update to the latest C SDK version. Option C SDK version Standard distributed tracing 1.1.0 or higher (W3C Trace Context not available) Infinite Tracing Not available Go Install or update to the required Go agent version. For best results, update to the latest Go agent version. Option Go agent version Standard distributed tracing 2.1.0 or higher With W3C Trace Context: 3.1.0 or higher Infinite Tracing v3.5.0 (includes W3C Trace Context) Supported environments: Go 1.9 or higher Java Install or update to the required Java agent version. For best results, update to the latest Java agent version. Type Java agent version Standard distributed tracing 4.3.0 or higher With W3C Trace Context: 5.10 or higher Infinite Tracing 5.12.1 or higher (includes W3C Trace Context) Supported environments: Java 8: Update 252 or higher All versions of Java 9 or higher For special considerations, see Infinite Tracing: Configuring SSL for Java 7 and 8. .NET Install or update to the required .NET agent version. For best results, update to the latest .NET agent version. Option .NET agent version Standard distributed tracing 8.6.45.0 or higher With W3C Trace Context: 8.27.139.0 or higher Infinite Tracing 8.30.0 (includes W3C Trace Context) Supported environments: .NET Framework 4.5 or higher .NET Core 2.0 or higher Node.js Install or update to the required Node.js agent version. For best results, update to the latest Node.js agent version. Option Node.js agent version Standard distributed tracing 4.7.0 or higher With W3C Trace Context: 6.4 or higher Infinite Tracing 6.7.0 (includes W3C Trace Context) Supported environments: Node version 10.10.0 or higher PHP Install or update to the required PHP agent version. For best results, update to the latest PHP agent version. Option PHP agent version Standard distributed tracing 8.4 or higher With W3C Trace Context: 9.8 or higher Infinite Tracing 9.12.0.268 or higher Python Install or update to the required Python agent version. For best results, update to the latest Python agent version. Option Python agent version Standard distributed tracing 4.2.0.100 or higher With W3C Trace Context: 5.6 or higher Infinite Tracing 5.12.0.140 (includes W3C Trace Context) Supported environments: CPython only (pypy is unsupported) Ruby Install or update to the required Ruby agent version. For best results, update to the latest Ruby agent version. Also install the additional Ruby agent gem for Infinite Tracing. Option Ruby agent version Standard distributed tracing newrelic_rpm 5.3.0.346 or higher With W3C Trace Context: newrelic_rpm 6.9 or higher Infinite Tracing newrelic_rpm 6.11.0.365 or higher (includes W3C Trace Context) newrelic-infinite_tracing 6.11.0.375 or higher Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Configure the agents. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Endpoints dropdown value Description For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. Configure the agents. For other integrations (Optional) Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in 2b. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. Configure the agents Distributed tracing is enabled through configuration settings. The settings you need to change for distributed tracing depend on the type you want: Standard distributed tracing Infinite Tracing (requires YOUR_TRACE_OBSERVER_HOST from step 2) Review the following section for your agent to see the required configuration settings. For more information, see Configure the agent. Server-side configuration is not available for Infinite Tracing. C SDK Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your C applications. Type Required configuration Standard distributed tracing Configuration examples: newrelic_app_config_t structure: newrelic_app_config_t* config; config = newrelic_create_app_config(app_name, license_key); config->distributed_tracing.enabled = true; Infinite Tracing Not available Go Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your Go applications. Type Required configuration Standard distributed tracing Configuration examples: ConfigOption structure: newrelic.NewApplication( newrelic.ConfigAppName(\"Example App\"), newrelic.ConfigLicense(os.Getenv(\"NEW_RELIC_LICENSE_KEY\")), newrelic.ConfigDistributedTracerEnabled(true), ) Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: newrelic.Config structure: app, err := newrelic.NewApplication( newrelic.ConfigAppName(YOUR_APP_NAME), newrelic.ConfigLicense(YOUR_LICENSE_KEY), func(cfg *newrelic.Config) { cfg.DistributedTracer.Enabled = true cfg.InfiniteTracing.TraceObserver.Host = YOUR_TRACE_OBSERVER_HOST }, ) Environment variables: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=YOUR_TRACE_OBSERVER_HOST Java Here's an overview of the settings. For more help with configuration, see Java agent configuration: Config file. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true Java system property: -Dnewrelic.config.distributed_tracing.enabled=true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: \"YOUR_TRACE_OBSERVER_HOST\" Java system property: -Dnewrelic.config.distributed_tracing.enabled=true -Dnewrelic.config.infinite_tracing.trace_observer.host=\"YOUR_TRACE_OBSERVER_HOST\" Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" .NET Here's an overview of the settings. For more help with configuration, see .NET agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Node.js Here's an overview of the settings. For more help with configuration, see Node.js agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } infinite_tracing: { trace_observer: { host: 'YOUR_TRACE_OBSERVER_HOST' } } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" PHP Here's an overview of the settings. For more help with configuration, see Distributed tracing for the PHP agent Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true Infinite Tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true newrelic.span_events_enabled = true newrelic.infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Python Here's an overview of the settings. For more help with configuration, see Python agent configuration Type Required configuration Standard distributed tracing Configuration file (newrelic.ini): distributed_tracing.enabled = true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Use the following installation command: pip install newrelic[infinite-tracing] Configuration file (newrelic.ini): distributed_tracing.enabled = true infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Ruby Here's an overview of the settings. For more help with configuration, see Ruby agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: 'YOUR_TRACE_OBSERVER_HOST' Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" If you need help with proxy configuration, see Proxy support. Step 4. View traces After you upgrade and configure your APM agents to send data to your trace observer, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID Manual instrumentation (If automatic instrumentation doesn't work) Recommendation: Before performing any custom instrumentation, read: How distributed tracing works Troubleshoot missing data If a service is not passing the trace header to other services, you can use the distributed tracing payload APIs to instrument the calling service and the called service. The calling service uses an API call to generate a payload, which is accepted by the called service. Instrument the calling service To instrument the calling service: Ensure the version of the APM agent that monitors the calling service supports distributed tracing. Invoke the agent API call for generating a distributed trace payload: C SDK | Go | Java | .NET | Node.js | PHP | Python | Ruby. To maintain proper ordering of spans in a trace, ensure you generate the payload in the context of the span that sends it. Add that payload to the call made to the destination service (for example, in a header). (Optional) Identify the call as an external call: C SDK Go Java .NET: n/a Node.js PHP: n/a Python Ruby Instrument the called service To instrument the called service: Ensure the version of the APM agent that monitors the called service supports distributed tracing. If the New Relic agent on the called service does not identify a New Relic transaction, use the agent API to declare a transaction: C SDK One way to tell that a transaction is not in progress: when newrelic_create_distributed_trace_payload() is called, a NULL pointer is returned. To solve this problem, follow the procedures to create a transaction with the C SDK. Go One way to tell that a transaction is not in progress: when Transaction.InsertDistributedTraceHeaders(h http.Header) is called, no headers are inserted. To create a transaction, see Instrument Go transactions. Java One way to tell that a transaction is not in progress: when createDistributedTracePayload() is called, an empty string is returned. To create a transaction, see Java agent transaction-related APIs. .NET One way to tell that a transaction is not in progress: CreateDistributedTracePayload() returns an empty payload. To create a transaction, see Introduction to .NET custom instrumentation. Node.js One way to tell that a transaction is not in progress: the Node.js agent logs will report an error similar to this: No transaction found when calling Transaction.acceptDistributedTracePayload. Use startWebTransaction to create a web transaction or startBackgroundTransaction to capture a non-web transaction. PHP One way to tell that a transaction is not in progress: newrelic_insert_distributed_trace_headers() returns false. To create a transaction, see newrelic_start_transaction. Python To tell that a transaction is not in progress: when transaction = current_transaction() is run, transaction is None. Or, if result = accept_distributed_trace_payload(payload) is run, then the result is False. Use background_task to report a non-web transaction. For more on Python instrumentation, see Monitor transactions and segments. Ruby If you are using a Rack-based web framework and have enabled New Relic's Rack instrumentation, the Ruby agent will handle starting a transaction for you. For other use cases, see the add_transaction_tracer API method. Extract the payload from the call that you received (for example, in a header). Invoke the call for accepting the payload: C SDK | Go | Java | .NET | PHP | Node.js | Python | Ruby. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 126.90546, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Trace API", + "body": " the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see" + }, + "id": "5eb2c480e7b9d2bc7afa4921" + }, + { + "category_2": "Enable and configure", + "nodeid": 38171, + "sections": [ + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Integrations: Enable distributed tracing", + "Step 1. Install the integration", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. (Infinite Tracing) Configure the integration", + "Step 4. View traces", + "For more help" + ], + "title": "Integrations: Enable distributed tracing", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", + "published_at": "2020-09-30T14:39:10Z", + "updated_at": "2020-09-30T14:39:10Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "document_type": "page", + "popularity": 1, + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 122.757996, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Trace API", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": " integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using" + }, + "id": "5ea0617064441ff137912311" + }, + { + "sections": [ + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" + ], + "title": "Add tables to your New Relic One application", + "type": "developer", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-03T13:47:59Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", + "popularity": 1, + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 121.587746, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" + }, + "id": "5efa989ee7b9d2ad567bab51" + } + ], + "/collect-data/query-data-nrql": [ + { + "category_2": "Alert conditions", + "nodeid": 9231, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" + ], + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-09-30T20:06:36Z", + "updated_at": "2020-09-30T20:06:35Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "document_type": "page", + "popularity": 1, + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 143.0247, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Create NRQL alert conditions", + "sections": "NRQL alert syntax", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" + }, + "id": "5f2d992528ccbc489d88dfc1" + }, + { + "category_2": "Custom events", + "nodeid": 13661, + "sections": [ + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" + ], + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "document_type": "page", + "popularity": 1, + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 125.284424, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Data requirements and limits for custom event data", + "sections": "Event data sources", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" + }, + "id": "59f4354f4bb81c2ea8b80d0a" + }, + { + "category_2": "Get started", + "nodeid": 11431, + "sections": [ + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Introduction to NRQL, New Relic's query language", + "What is NRQL?", + "Where can you use NRQL?", + "What data can you query with NRQL?", + "Start using NRQL", + "NRQL query examples", + "NRQL syntax", + "For more help" + ], + "title": "Introduction to NRQL, New Relic's query language", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "published_at": "2020-10-03T15:18:02Z", + "updated_at": "2020-09-24T08:40:20Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", + "document_type": "page", + "popularity": 1, + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 124.89453, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Introduction to NRQL, New Relic's query language", + "sections": "What data can you query with NRQL?", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + }, + "id": "5f2abd47196a67747343fbe1" + }, + { + "category_2": "Ingest APIs", + "nodeid": 35526, + "sections": [ + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Metric API limits and restricted attributes", + "Endpoint requirements and maximum limits", + "Rate limit violations", + "Restricted attributes", + "For more help" + ], + "title": "Metric API limits and restricted attributes", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", + "published_at": "2020-10-03T22:32:05Z", + "updated_at": "2020-10-03T22:32:04Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "document_type": "page", + "popularity": 1, + "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", + "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 112.646484, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Ingest and manage data", + "category_0": "Telemetry Data Platform", + "category_1": "Ingest and manage data", + "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + }, + "id": "5f24e4ede7b9d28743c8231c" + }, + { + "category_2": "NRQL query tutorials", + "nodeid": 36916, + "sections": [ + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", + "For more help" + ], + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 136.29944, + "_score": 98.131744, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "NR One Catalog", - "body": ", you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5efa9973196a67d16d76645c" + "id": "5f2b1349196a67379343fbcf" } ], - "/explore-docs/nr1-subscription": [ + "/build-apps/add-nerdgraphquery-guide": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "New Relic One CLI reference", + "published_at": "2020-10-03T13:45:46Z", + "title": "Build apps", + "updated_at": "2020-10-03T02:03:44Z", "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-02T02:12:20Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 256.43732, + "_score": 764.49646, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5efa999d64441fc0f75f7e21" }, { - "nodeid": 37686, "sections": [ - "AWS Lambda monitoring", - "Get started", - "Enable Lambda monitoring", - "UI and data", - "Troubleshooting", - "Update serverless monitoring for AWS Lambda", - "Update our Lambda integration via CLI", - "Update Layers via CLI", - "Update a manual Serverless Application Repository install", - "Enabling log management", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Update serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", - "type": "docs", - "category_1": "AWS Lambda monitoring", - "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", - "image": "", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", - "published_at": "2020-09-30T14:25:39Z", - "updated_at": "2020-09-24T13:54:59Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-03T13:47:57Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "How to update our Serverless monitoring for AWS Lambda. ", - "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.04523, + "_score": 379.8938, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Update our Lambda integration via CLI", - "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" + "title": "Map page views by region in a custom app", + "sections": "Query your browser data", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" }, - "id": "5f6ca534196a67b08750423e" + "id": "5efa993c196a67066b766469" }, { + "category_2": "NRQL query tutorials", + "nodeid": 36916, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-02T02:16:27Z", - "updated_at": "2020-08-14T01:47:12Z", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.77534, + "_score": 301.15198, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5f2b1349196a67379343fbcf" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Get started", + "nodeid": 17216, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "How New Relic distributed tracing works", + "How trace sampling works", + "Head-based sampling (standard distributed tracing)", + "Tail-based sampling (Infinite Tracing)", + "How trace data is structured", + "How trace data is stored", + "How trace context is passed between applications", + "For more help" ], - "published_at": "2020-10-02T02:10:51Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "How New Relic distributed tracing works", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works", + "external_id": "c4eac888d4d46698466b40c3e7e6583c162cd52b", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-distributed-tracing-trace-structure.png", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works", + "published_at": "2020-10-03T23:12:33Z", + "updated_at": "2020-10-03T23:12:33Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Get started", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "A technical explanation of how New Relic's distributed tracing feature works. ", + "body": "Here are some technical details about how New Relic distributed tracing works: How trace sampling works How trace data is structured How trace data is stored How trace context is passed between applications For instructions about setting up distributed tracing, see Overview: Enable distributed tracing. How trace sampling works We offer the following types of sampling: Head-based sampling (standard distributed tracing) Tail-based sampling (Infinite Tracing) Head-based sampling (standard distributed tracing) Distributed tracing requires the reporting and processing of a large amount of data. For this reason, we have limits on data reporting, and we use sampling to capture a representative sample of activity. Ideally, the sampled data represents the characteristics of your larger data set and provides the detail you need for troubleshooting. Standard distributed tracing applies filters to individual spans before all spans in a trace arrive. This is called head-based sampling, which means decisions about whether to accept spans is made at the head (beginning) of the filtering process. Here are some details about the head-based sampling in standard distributed tracing: Adaptive sampling process (APM agents) APM agents use adaptive sampling to capture a representative sample of system activity. The following is an explanation of how adaptive sampling works. (AWS Lambda monitoring uses a different sampling process.) For the first service in a distributed trace, 10 requests are chosen to be sampled. The throughput to that service is used to adjust how frequently requests are sampled. This is explained in more detail below. The first service we monitor in a distributed trace is called the trace origin. The trace origin chooses requests at random to be traced. That decision propagates to the downstream services touched by that request. When the request has completed, all of the spans created by the services touched by that request are available in the UI as a complete end-to-end trace. APM agents have a limit on the number of transactions collected per minute (this can vary, depending on agent) and a limit on the number of spans collected per minute (1000 per agent instance). To adhere to these limits, the default number of traces at the trace origin is 10 traces per minute. An APM agent spreads out the collection of these 10 traces over a minute in order to get a representative sample over time. The exact sampling rate depends on the number of transactions in the previous minute. The rate responds to changes in transaction throughput, going up or down. For example, if the previous minute had 100 transactions, the agent would anticipate a similar number of transactions and select 1 out of every 10 transactions to be traced. Span limits and sampling (APM agents) An APM agent instance using head-based sampling has a limit of 1000 spans per minute. The agent attempts to keep all spans that are marked to be sampled as part of a distributed trace. In many distributed systems, the average microservice may generate 10 to 20 spans per request. In those cases, the agent span limit can accommodate all spans chosen, and that service will have full detail in a trace. However, some requests to services will generate many spans, and the agent span limit will be reached. As a result, some traces will not have full detail for that service. One solution to this would be to custom instrument an agent to report less activity and therefore report fewer spans. Browser span reporting Browser monitoring reports all spans, but APM samples a percentage of spans. This means that there will likely be many more browser spans than back-end spans, which can result in browser app spans disconnected from back-end spans. For tips on querying for traces that contain front and back-end spans, see Find browser span data. Trace rate limiting If the above sampling methods still result in too much trace data, we may limit incoming data by sampling traces after they're received. By making this decision at the trace level, it avoids fragmenting traces (accepting only part of a trace). This process works similarly to adaptive sampling. The total spans received in a minute are totaled. If too many spans are received, fewer spans may be accepted in the following minute, in order to achieve a floating-average throughput rate. Tail-based sampling (Infinite Tracing) Tail-based sampling is available in Infinite Tracing, an additional option available for distributed tracing. Infinite Tracing uses tail-based sampling to accept and analyze 100% of your span data. Tail-based sampling means that filtering decisions are done at the tail end of processing after all the spans in a trace have arrived. Only traces that contain the most actionable data, such as errors or unusual latency, are forwarded for you to view in the UI. Architecture For Infinite Tracing, agents or integrations send 100% of all instrumented spans to a trace observer. The trace observer is a distributed tracing service residing in a cluster of services on AWS called New Relic Edge. Only your spans go to the trace observer—all other data such as metrics, custom events, and transaction traces are sent the normal route to New Relic and are subject to local sampling. You configure a unique trace observer endpoint for the AWS region you want to send data to. You can request multiple endpoints, one per AWS region. The endpoint represents a trace observer for a particular workload. For example, all spans from a single trace (request) must go to that endpoint. Here are two architectural diagrams: one showing how data flows if you use APM agents and another if you use New Relic integrations like OpenTelemetry exporters: The trace observer holds traces open while spans for that trace arrive. Once the first span in a trace arrives, a session is kept open for 10 seconds. Each time a new span for that trace arrives, the expiration time is reset to 10 seconds. Traces that haven't seen a span arrive within the last 10 seconds will automatically expire. Tail-based sampling algorithms By default, each trace observer offers traces to three samplers: one looking for duration outliers, one looking for traces with errors, and one trying to randomly sample across all trace types. Each sampler keeps a target percentage of traces that match their criteria. Here are details about each sampler: Sampler Matching criteria Target percent Duration Traces with an outlier duration, using two algorithms: Gaussian (Assumes a normal distribution and a threshold at the 99th percentile) Eccentricity (Assumes no distribution and a threshold based on cluster) 100% Error Traces having at least one span with an error 100% Random All traces 1% If the matching criteria matches the trace, each sampler looks at the trace’s shape. A trace’s shape is the unique combination of the root span’s entity name and span name. This is a simple way to separate traces using the entry point of the request. Once the shape is determined, the sampler makes a decision to keep or reject the trace based on its target sampling percent. If it’s 100%, the trace is automatically kept. If it’s anything less, the probability the sampler keeps a given trace is determined by the target percent. For example, the target percent is 1 for random traces, so 1% of those traces are kept. Because the trace observer uses percentages of throughput, the number of traces selected will vary with that throughput. How trace data is structured Understanding the structure of a distributed trace can help you: Understand how traces are displayed in our UI Help you query trace data A distributed trace has a tree-like structure, with \"child\" spans that refer to one \"parent\" span. This diagram shows some important span relationships in a trace: This diagram shows how spans in a distributed trace relate to each other. This diagram shows several important concepts: Trace root. The first service or process in a trace is referred to as the root service or process. Process boundaries. A process represents the execution of a logical piece of code. Examples of a process include a backend service or Lambda function. Spans within a process are categorized as one of the following: Entry span: the first span in a process. Exit span: a span is a considered an exit span if it a) is the parent of an entry span, or b) has http. or db. attributes and therefore represents an external call. In-process span: a span that represents an internal method call or function and that is not an exit or entry span. Client spans. A client span represents a call to another entity or external dependency. Currently, there are two client span types: Datastore. If a client span has any attributes prefixed with db. (like db.statement), it's categorized as a datastore span. External. If a client span has any attributes prefixed with http. (like http.url) or has a child span in another process, it's categorized as an external span. This is a general category for any external calls that are not datastore queries. Trace duration. A trace's total duration is determined by the length of time from the start of the earliest span to the completion of the last span. You can query span relationship data with the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. How trace data is stored Understanding how we store trace data can help you query your trace data. We save trace data as: Span: A span represents operations that are part of a distributed trace. The operations that a span can represent include browser-side interactions, datastore queries, calls to other services, method-level timing, and Lambda functions. One example: in an HTTP service, a span is created at the start of an HTTP request and completed when the HTTP server returns a response. Span attributes contain important information about that operation (such as duration, host data, etc.), including trace-relationship details (such as traceId, guid). For span-related data, see span attributes. Transaction: If an entity in a trace is monitored by an agent, a request to that entity generates a single Transaction event. Transactions allow trace data to be tied to other New Relic features. For transaction-related data, see transaction attributes. Contextual metadata. We store metadata that shows calculations about a trace and the relationships between its spans. To query this data, use the NerdGraph GraphiQL explorer. How trace context is passed between applications We support the W3C Trace Context standard, which makes it easier to trace transactions across networks and services. When you enable distributed tracing, New Relic agents add HTTP headers to a service's outbound requests. HTTP headers act like passports on an international trip: They identify your software traces and carry important information as they travel through various networks, processes, and security systems. The headers also contain information that helps us link the spans together later: metadata like the trace ID, span ID, the New Relic account ID, and sampling information. This header information is passed along each span of a trace, unless the progress is stopped by something like middleware or agents that don't recognize the header format (see Figure 1). Figure 1 To address the problem of header propagation, we support the W3C Trace Context specification that requires two standardized headers. Our latest W3C New Relic agents send and receive these two required headers, and by default, they also send and receive the header of the prior New Relic agent: W3C (traceparent): The primary header that identifies the entire trace (trace ID) and the calling service (span id). W3C (tracestate): A required header that carries vendor-specific information and tracks where a trace has been. New Relic (newrelic): The original, proprietary header that is still sent to maintain backward compatibility with prior New Relic agents. This combination of three headers allows traces to be propagated across services instrumented with these types of agents: W3C New Relic agents Non-W3C New Relic agents W3C Trace Context-compatible agents If your requests only touch W3C Trace Context-compatible agents, you can opt to turn off the New Relic header. See the agent configuration documentation for details about turning off the newrelic header. The scenarios below show various types of successful header propagation. Scenario 1: Trace touching three agent types This shows the flow of headers when a request touches three different agent types: Scenario 2: Trace with W3C New Relic and middleware This shows the combination of headers sent by a W3C New Relic agent to some middleware. Scenario 3: Trace with any W3C-compliant agent and a New Relic agent. This shows the two required W3C headers from another vendor accepted by a W3C New Relic agent. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.41413, + "_score": 291.98853, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "sections": "UI and data", + "body": " to other New Relic features. For transaction-related data, see transaction attributes. Contextual metadata. We store metadata that shows calculations about a trace and the relationships between its spans. To query this data, use the NerdGraph GraphiQL explorer. How trace context is passed between" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5d4bcef728ccbcc1b2df8700" }, { - "nodeid": 27692, + "category_2": "Enable and configure", + "nodeid": 17021, "sections": [ - "AWS Lambda monitoring", + "Distributed tracing", "Get started", - "Enable Lambda monitoring", + "Enable and configure", + "Other requirements", "UI and data", + "Trace API", "Troubleshooting", - "Enable serverless monitoring for AWS Lambda", - "How Lambda monitoring works", - "Enable procedure overview", - "Step 1. Install the newrelic-lambda-cli tool", - "CLI requirements", - "CLI installation", - "Step 2. Connect AWS to New Relic", - "Use CLI tool", - "Manual procedures", - "Step 3. Enable Lambda instrumentation", - "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", - "What's next?", - "Optional: Stream all logs to New Relic", + "Language agents: Enable distributed tracing", + "Step 1. Prerequisites", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. Configure the agents", + "Step 4. View traces", + "Manual instrumentation (If automatic instrumentation doesn't work)", "For more help" ], - "title": "Enable serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", + "title": "Language agents: Enable distributed tracing", + "category_0": "Understand dependencies", "type": "docs", - "category_1": "AWS Lambda monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "published_at": "2020-09-30T17:18:05Z", - "updated_at": "2020-09-24T09:32:20Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "category_1": "Distributed tracing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", + "external_id": "92f81f3ba78006bec29baec46891cf6cfb1c9468", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", + "published_at": "2020-10-03T21:57:11Z", + "updated_at": "2020-10-03T21:57:11Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", "document_type": "page", "popularity": 1, - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. When the Lambda is invoked, log data is sent to CloudWatch. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to enable distributed tracing or Infinite Tracing for APM agents.", + "body": "Here's what you need to know for enabling either standard distributed tracing or Infinite Tracing with our language agents. If you want to get more background before getting started, check out these topics: How span sampling works explains distributed tracing options. Impacts to APM tells you what to expect if you are a current APM user. The process of enabling distributed tracing takes you through these steps: Meet the prerequisites (Infinite Tracing) Set up a trace observer Configure your agents View traces Step 1. Prerequisites Check the following sections to confirm that the distributed tracing options you want are available for your environment. Your main options are: Standard distributed tracing: Head-based sampling Infinite Tracing: Tail-based sampling Support for W3C Trace Context: Available in all Infinite Tracing agents and in standard distributed tracing agents as noted Once you find the agent version with the features you want, follow the links for help installing or updating your agent. For best results, update existing agents to the latest version. C SDK Install (compile) or update to the required C SDK version. For best results, update to the latest C SDK version. Option C SDK version Standard distributed tracing 1.1.0 or higher (W3C Trace Context not available) Infinite Tracing Not available Go Install or update to the required Go agent version. For best results, update to the latest Go agent version. Option Go agent version Standard distributed tracing 2.1.0 or higher With W3C Trace Context: 3.1.0 or higher Infinite Tracing v3.5.0 (includes W3C Trace Context) Supported environments: Go 1.9 or higher Java Install or update to the required Java agent version. For best results, update to the latest Java agent version. Type Java agent version Standard distributed tracing 4.3.0 or higher With W3C Trace Context: 5.10 or higher Infinite Tracing 5.12.1 or higher (includes W3C Trace Context) Supported environments: Java 8: Update 252 or higher All versions of Java 9 or higher For special considerations, see Infinite Tracing: Configuring SSL for Java 7 and 8. .NET Install or update to the required .NET agent version. For best results, update to the latest .NET agent version. Option .NET agent version Standard distributed tracing 8.6.45.0 or higher With W3C Trace Context: 8.27.139.0 or higher Infinite Tracing 8.30.0 (includes W3C Trace Context) Supported environments: .NET Framework 4.5 or higher .NET Core 2.0 or higher Node.js Install or update to the required Node.js agent version. For best results, update to the latest Node.js agent version. Option Node.js agent version Standard distributed tracing 4.7.0 or higher With W3C Trace Context: 6.4 or higher Infinite Tracing 6.7.0 (includes W3C Trace Context) Supported environments: Node version 10.10.0 or higher PHP Install or update to the required PHP agent version. For best results, update to the latest PHP agent version. Option PHP agent version Standard distributed tracing 8.4 or higher With W3C Trace Context: 9.8 or higher Infinite Tracing 9.12.0.268 or higher Python Install or update to the required Python agent version. For best results, update to the latest Python agent version. Option Python agent version Standard distributed tracing 4.2.0.100 or higher With W3C Trace Context: 5.6 or higher Infinite Tracing 5.12.0.140 (includes W3C Trace Context) Supported environments: CPython only (pypy is unsupported) Ruby Install or update to the required Ruby agent version. For best results, update to the latest Ruby agent version. Also install the additional Ruby agent gem for Infinite Tracing. Option Ruby agent version Standard distributed tracing newrelic_rpm 5.3.0.346 or higher With W3C Trace Context: newrelic_rpm 6.9 or higher Infinite Tracing newrelic_rpm 6.11.0.365 or higher (includes W3C Trace Context) newrelic-infinite_tracing 6.11.0.375 or higher Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Configure the agents. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Endpoints dropdown value Description For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. Configure the agents. For other integrations (Optional) Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in 2b. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. Configure the agents Distributed tracing is enabled through configuration settings. The settings you need to change for distributed tracing depend on the type you want: Standard distributed tracing Infinite Tracing (requires YOUR_TRACE_OBSERVER_HOST from step 2) Review the following section for your agent to see the required configuration settings. For more information, see Configure the agent. Server-side configuration is not available for Infinite Tracing. C SDK Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your C applications. Type Required configuration Standard distributed tracing Configuration examples: newrelic_app_config_t structure: newrelic_app_config_t* config; config = newrelic_create_app_config(app_name, license_key); config->distributed_tracing.enabled = true; Infinite Tracing Not available Go Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your Go applications. Type Required configuration Standard distributed tracing Configuration examples: ConfigOption structure: newrelic.NewApplication( newrelic.ConfigAppName(\"Example App\"), newrelic.ConfigLicense(os.Getenv(\"NEW_RELIC_LICENSE_KEY\")), newrelic.ConfigDistributedTracerEnabled(true), ) Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: newrelic.Config structure: app, err := newrelic.NewApplication( newrelic.ConfigAppName(YOUR_APP_NAME), newrelic.ConfigLicense(YOUR_LICENSE_KEY), func(cfg *newrelic.Config) { cfg.DistributedTracer.Enabled = true cfg.InfiniteTracing.TraceObserver.Host = YOUR_TRACE_OBSERVER_HOST }, ) Environment variables: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=YOUR_TRACE_OBSERVER_HOST Java Here's an overview of the settings. For more help with configuration, see Java agent configuration: Config file. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true Java system property: -Dnewrelic.config.distributed_tracing.enabled=true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: \"YOUR_TRACE_OBSERVER_HOST\" Java system property: -Dnewrelic.config.distributed_tracing.enabled=true -Dnewrelic.config.infinite_tracing.trace_observer.host=\"YOUR_TRACE_OBSERVER_HOST\" Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" .NET Here's an overview of the settings. For more help with configuration, see .NET agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Node.js Here's an overview of the settings. For more help with configuration, see Node.js agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } infinite_tracing: { trace_observer: { host: 'YOUR_TRACE_OBSERVER_HOST' } } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" PHP Here's an overview of the settings. For more help with configuration, see Distributed tracing for the PHP agent Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true Infinite Tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true newrelic.span_events_enabled = true newrelic.infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Python Here's an overview of the settings. For more help with configuration, see Python agent configuration Type Required configuration Standard distributed tracing Configuration file (newrelic.ini): distributed_tracing.enabled = true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Use the following installation command: pip install newrelic[infinite-tracing] Configuration file (newrelic.ini): distributed_tracing.enabled = true infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Ruby Here's an overview of the settings. For more help with configuration, see Ruby agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: 'YOUR_TRACE_OBSERVER_HOST' Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" If you need help with proxy configuration, see Proxy support. Step 4. View traces After you upgrade and configure your APM agents to send data to your trace observer, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID Manual instrumentation (If automatic instrumentation doesn't work) Recommendation: Before performing any custom instrumentation, read: How distributed tracing works Troubleshoot missing data If a service is not passing the trace header to other services, you can use the distributed tracing payload APIs to instrument the calling service and the called service. The calling service uses an API call to generate a payload, which is accepted by the called service. Instrument the calling service To instrument the calling service: Ensure the version of the APM agent that monitors the calling service supports distributed tracing. Invoke the agent API call for generating a distributed trace payload: C SDK | Go | Java | .NET | Node.js | PHP | Python | Ruby. To maintain proper ordering of spans in a trace, ensure you generate the payload in the context of the span that sends it. Add that payload to the call made to the destination service (for example, in a header). (Optional) Identify the call as an external call: C SDK Go Java .NET: n/a Node.js PHP: n/a Python Ruby Instrument the called service To instrument the called service: Ensure the version of the APM agent that monitors the called service supports distributed tracing. If the New Relic agent on the called service does not identify a New Relic transaction, use the agent API to declare a transaction: C SDK One way to tell that a transaction is not in progress: when newrelic_create_distributed_trace_payload() is called, a NULL pointer is returned. To solve this problem, follow the procedures to create a transaction with the C SDK. Go One way to tell that a transaction is not in progress: when Transaction.InsertDistributedTraceHeaders(h http.Header) is called, no headers are inserted. To create a transaction, see Instrument Go transactions. Java One way to tell that a transaction is not in progress: when createDistributedTracePayload() is called, an empty string is returned. To create a transaction, see Java agent transaction-related APIs. .NET One way to tell that a transaction is not in progress: CreateDistributedTracePayload() returns an empty payload. To create a transaction, see Introduction to .NET custom instrumentation. Node.js One way to tell that a transaction is not in progress: the Node.js agent logs will report an error similar to this: No transaction found when calling Transaction.acceptDistributedTracePayload. Use startWebTransaction to create a web transaction or startBackgroundTransaction to capture a non-web transaction. PHP One way to tell that a transaction is not in progress: newrelic_insert_distributed_trace_headers() returns false. To create a transaction, see newrelic_start_transaction. Python To tell that a transaction is not in progress: when transaction = current_transaction() is run, transaction is None. Or, if result = accept_distributed_trace_payload(payload) is run, then the result is False. Use background_task to report a non-web transaction. For more on Python instrumentation, see Monitor transactions and segments. Ruby If you are using a Rack-based web framework and have enabled New Relic's Rack instrumentation, the Ruby agent will handle starting a transaction for you. For other use cases, see the add_transaction_tracer API method. Extract the payload from the call that you received (for example, in a header). Invoke the call for accepting the payload: C SDK | Go | Java | .NET | PHP | Node.js | Python | Ruby. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 117.686356, + "_score": 286.77063, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 1. Install the newrelic-lambda-cli tool", - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": " CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand" + "sections": "UI and data", + "body": " the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United" }, - "id": "5f6c67a464441f3a75eb72d3" + "id": "5eb2c480e7b9d2bc7afa4921" } ] } \ No newline at end of file From f5b90e670d6d809709373daddcb783a6318daefd Mon Sep 17 00:00:00 2001 From: nr-opensource-bot Date: Mon, 5 Oct 2020 01:02:44 +0000 Subject: [PATCH 3/7] chore(related-content): updated related content data --- src/data/related-pages.json | 8729 +++++++++++++++++------------------ 1 file changed, 4363 insertions(+), 4366 deletions(-) diff --git a/src/data/related-pages.json b/src/data/related-pages.json index 5dfdc2acb..95cbd5621 100644 --- a/src/data/related-pages.json +++ b/src/data/related-pages.json @@ -1,215 +1,4 @@ { - "/build-apps/howto-use-nrone-table-components": [ - { - "image": "", - "url": "https://developer.newrelic.com/components/table-header-cell/", - "sections": [ - "TableHeaderCell", - "Usage", - "Props" - ], - "published_at": "2020-10-03T13:51:17Z", - "title": "TableHeaderCell", - "updated_at": "2020-08-03T04:46:36Z", - "type": "developer", - "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", - "document_type": "page", - "popularity": 1, - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 507.47113, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "TableHeaderCell", - "sections": "TableHeaderCell", - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component." - }, - "id": "5efa9906196a67523e76646e" - }, - { - "image": "", - "url": "https://developer.newrelic.com/components/table-row/", - "sections": [ - "TableRow", - "Usage", - "Props" - ], - "published_at": "2020-10-03T13:51:17Z", - "title": "TableRow", - "updated_at": "2020-08-03T04:45:42Z", - "type": "developer", - "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", - "document_type": "page", - "popularity": 1, - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 415.10007, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "TableRow", - "sections": "TableRow", - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component." - }, - "id": "5efa98d564441f93435f7e24" - }, - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-03T13:45:46Z", - "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 414.3131, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" - }, - "id": "5efa999d64441fc0f75f7e21" - }, - { - "category_2": "Cloud adoption", - "nodeid": 16121, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Create application baselines", - "1. Identify components", - "2. Determine compatibility", - "3. Deploy monitoring", - "4. Gather metrics", - "5. Set up Dashboards", - "Expert tips", - "For more help" - ], - "title": "Create application baselines", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", - "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", - "published_at": "2020-10-03T21:26:31Z", - "updated_at": "2020-09-27T20:07:57Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 303.5249, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Create application baselines", - "sections": "1. Identify components", - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" - }, - "id": "5ad48685c75d0766faa181bd" - }, - { - "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" - ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-03T13:47:57Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 292.61133, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Import the TableChart component", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" - }, - "id": "5efa993c196a67066b766469" - } - ], "/automate-workflows/5-mins-tag-resources": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", @@ -230,18 +19,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T01:55:57Z", "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 178.94102, + "_score": 180.70761, "_version": null, "_explanation": null, "sort": null, @@ -260,29 +49,29 @@ "Guides to automate workflows", "Quickly tag resources", "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", "Automatically tag a simple \"Hello World\" Demo across the entire stack", "Automate common tasks", - "Set up New Relic using the Kubernetes operator", "Set up New Relic using Terraform" ], - "published_at": "2020-10-03T13:46:53Z", + "published_at": "2020-10-04T02:09:04Z", "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", + "updated_at": "2020-10-04T02:09:04Z", "type": "developer", "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 159.03725, + "_score": 160.4002, "_version": null, "_explanation": null, "sort": null, "highlight": { "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" }, "id": "5efa999c196a67dfb4766445" }, @@ -317,7 +106,7 @@ "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.494095, + "_score": 113.96498, "_version": null, "_explanation": null, "sort": null, @@ -353,7 +142,7 @@ "external_id": "531f2f3985bf64bb0dc92a642445887095048882", "image": "", "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-03T13:47:58Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, @@ -361,7 +150,7 @@ "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.813774, + "_score": 100.56128, "_version": null, "_explanation": null, "sort": null, @@ -411,7 +200,7 @@ "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.94252, + "_score": 83.04667, "_version": null, "_explanation": null, "sort": null, @@ -426,242 +215,127 @@ "id": "5f4c3992e7b9d2c2d203eddd" } ], - "/collect-data/custom-events": [ + "/collect-data/custom-attributes": [ { - "category_2": "Custom events", - "nodeid": 13661, + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Collect data - any source", + "Create custom events", + "Build queries with NerdGraph", + "Query data with NRQL" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "published_at": "2020-10-04T02:07:32Z", + "title": "Collect data", + "updated_at": "2020-10-04T02:07:32Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.23982, + "_score": 151.63216, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "sections": "Add custom attributes", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa997328ccbc768c307de2" }, { - "category_2": "Logs in context with agent APIs", - "nodeid": 36921, + "category_2": "Measure DevOps success", + "nodeid": 16556, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Annotate logs for logs in context using APM agent APIs", - "APM agent trace metadata and linking metadata APIs", - "Resources for correctly annotating logs", - "For more help" - ], - "title": "Annotate logs for logs in context using APM agent APIs", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", - "published_at": "2020-10-03T23:04:51Z", - "updated_at": "2020-09-27T21:36:25Z", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", - "document_type": "page", - "popularity": 1, - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.17322, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Annotate logs for logs in context using APM agent APIs", - "sections": "Logs in context with agent APIs", - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "category_2": "Logs in context with agent APIs", - "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" - }, - "id": "5f37535c196a67c8c055e5ff" - }, - { - "category_2": "Custom events", - "nodeid": 6256, - "sections": [ - "Event data sources", - "Default events", - "Custom events", - "APM: Report custom events", - "Data considerations", - "Record a custom event", - "Timestamps", - "Limits and restricted characters", - "Reserved words", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: track experience indicators", + "Prerequisites", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Utilize data to separate performance by cohort and debug issues at the customer level", "For more help" ], - "title": "APM: Report custom events", - "category_0": "Insights", + "title": "Customer experience improvement: track experience indicators", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "published_at": "2020-10-03T15:13:27Z", - "updated_at": "2020-09-24T07:10:11Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "category_1": "New Relic solutions", + "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-03T21:48:58Z", + "updated_at": "2020-09-27T21:45:56Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "New Relic APM: how to report custom events and attributes.", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 74.77109, + "_score": 96.27499, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "APM: Report custom events", - "sections": "Custom events", - "info": "New Relic APM: how to report custom events and attributes.", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Customer experience improvement: track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" }, - "id": "5f480a5a64441f578bfdcdb1" + "id": "5f5adb2728ccbc7152532752" }, { - "category_2": "Custom events", - "nodeid": 13806, + "category_2": "Optimize your cloud native environment", + "nodeid": 32796, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: Track experience indicators", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Use data to separate performance by cohort and debug issues at the customer level", "For more help" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "Customer experience improvement: Track experience indicators", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "category_1": "New Relic solutions", + "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-04T01:39:59Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 57.338745, + "_score": 96.10097, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Custom events", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Customer experience improvement: Track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5f5ac17528ccbce4f0532733" }, - { - "sections": [ - "Collect data from any source", - "Agent APIs", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API", - "Log API" - ], - "title": "Collect data from any source", - "type": "developer", - "tags": [ - "Agent API", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API" - ], - "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", - "image": "", - "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-08-14T01:45:09Z", - "document_type": "page", - "popularity": 1, - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 55.268936, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Agent APIs", - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "tags": "Agent API", - "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" - }, - "id": "5efa997128ccbc3c9a307dfd" - } - ], - "/automate-workflows/get-started-new-relic-cli": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -681,558 +355,459 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T01:55:57Z", "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 328.55396, + "_score": 95.533104, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Add custom attributes", + "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Browser agent release notes", + "nodeid": 40791, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" + "Browser agent release notes", + "Browser Agent v1184", + "Release Dates", + "New Features", + "Added support for custom attributes on PageViewTiming events", + "Issue Resolutions", + "How to upgrade your agent" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "title": "Browser Agent v1184", + "category_0": "Release notes", + "type": "docs", + "category_1": "Browser agent release notes", + "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", + "published_at": "2020-10-03T14:39:21Z", + "updated_at": "2020-10-02T05:37:45Z", + "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 308.78314, + "_score": 88.8313, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "sections": "Added support for custom attributes on PageViewTiming events", + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" }, - "id": "5efa999c196a67dfb4766445" - }, + "id": "5f76bca928ccbcaa75337d9b" + } + ], + "/build-apps/add-query-mutate-data-nerdstorage": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Quickly tag a set of resources", + "published_at": "2020-10-04T02:16:58Z", + "title": "Build apps", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", - "tags": [ - "tags", - "new relic CLI" - ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-08-14T01:45:08Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.13968, + "_score": 419.0056, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Quickly tag a set of resources", - "sections": "Install the New Relic CLI", - "info": "Add tags to applications you instrument for easier filtering and organization.", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "sections": "Add, query, and mutate data using NerdStorage", + "body": " your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Troubleshooting", - "nodeid": 40351, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", - "For more help" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-10-03T15:59:21Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-09-08T01:50:19Z", + "document_type": "page", "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 167.13422, + "_score": 119.39203, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "title": "Intro to NerdStorage", + "sections": "Intro to NerdStorage", + "info": "Intro to NerdStorage on New Relic One", + "tags": "nerdstorage", + "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" }, - "id": "5f4c3992e7b9d2c2d203eddd" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Alerts release notes", - "nodeid": 40771, "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "Component: Violation Tags", - "Update:" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", - "published_at": "2020-10-03T19:08:20Z", - "updated_at": "2020-09-29T16:10:16Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", - "info": "", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 164.08029, + "_score": 90.49411, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_1": "New Relic Platform release notes", - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f735c6928ccbc5f5d337dbb" - } - ], - "/build-apps/map-pageviews-by-region": [ + "id": "5efa989ee7b9d2024b7bab97" + }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "title": "Query and store data", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": [ + "nerdgraph query components", + "mutation components", + "static methods" + ], + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 159.1261, + "_score": 80.73134, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create a custom map view", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "Query and store data", + "sections": "Query and store data", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989e28ccbc2f15307deb" }, { + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Collect data - any source", + "Create custom events", + "Build queries with NerdGraph", + "Query data with NRQL" ], - "title": "Set up your development environment", + "published_at": "2020-10-04T02:07:32Z", + "title": "Collect data", + "updated_at": "2020-10-04T02:07:32Z", "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-08-26T01:47:20Z", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.23041, + "_score": 75.09915, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" + "title": "Collect data", + "sections": "Query data with NRQL", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5efa9973e7b9d242237bab39" - }, + "id": "5efa997328ccbc768c307de2" + } + ], + "/terms": [ { + "category_2": "Product definitions", + "nodeid": 39646, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "License information", + "General usage licenses", + "Special services licenses", + "Distributed licenses", + "Referenced policies", + "Product definitions", + "Usage plans", + "FAQ", + "New Relic One pricing: Definitions", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "New Relic One pricing: Definitions", + "category_0": "Licenses", + "type": "docs", + "category_1": "License information", + "external_id": "097fc095ef18942f3af1845237742340e36416b8", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-03T13:51:17Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-09-10T14:58:10Z", + "breadcrumb": "Contents / Licenses / License information / Product definitions", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.49306, + "_score": 344.14017, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "tags": "new relic one apps", - "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f23b039196a67030b94f5c4" }, { + "image": "", + "url": "https://opensource.newrelic.com/cla/", "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" - ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "NEW RELIC, INC.", + "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", + "Definitions." ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-03T13:47:59Z", - "updated_at": "2020-09-02T02:05:55Z", + "published_at": "2020-10-04T02:29:09Z", + "title": "New Relic Open Source Contributor License Agreement", + "updated_at": "2020-09-02T02:08:45Z", + "type": "opensource", + "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "", + "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.37285, + "_score": 337.66238, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created" + "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5f31822264441fcbe056a984" }, { - "category_2": "Additional standard features", - "nodeid": 1921, + "category_2": "Developer Edition", + "nodeid": 39641, "sections": [ - "Browser monitoring", - "Getting started", - "Guides", - "Installation", - "Configuration", - "Browser agent and SPA API", - "Page load timing resources", - "Browser Pro features", - "Additional standard features", - "Performance quality", - "Troubleshooting", - "Browser Geography: Webpage performance by location", - "Contents", - "View performance data by region", - "Use page functions", - "View drill-down details", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Developer Program Resources", "For more help" ], - "title": "Browser Geography: Webpage performance by location", - "category_0": "Browser monitoring", + "title": "Developer Program Resources", + "category_0": "Licenses", "type": "docs", - "category_1": "Browser monitoring", - "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", - "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", - "published_at": "2020-10-03T23:25:25Z", - "updated_at": "2020-08-15T09:25:45Z", - "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", + "category_1": "Product or service licenses", + "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", + "image": "", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-08-08T19:17:02Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", "document_type": "page", "popularity": 1, - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic Developer edition policy", + "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.817184, + "_score": 335.85278, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "View performance data by region", - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" + "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" }, - "id": "561c8bbc827a6617ad000172" - } - ], - "/collect-data/collect-data-from-any-source": [ + "id": "5f338507e7b9d2f670c9de83" + }, { - "category_2": "Ingest APIs", - "nodeid": 35471, + "category_2": "New Relic One", + "nodeid": 39366, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Telemetry SDKs: Report custom telemetry data", - "Requirements and compatibility", - "Available libraries", - "Write your own Telemetry SDK or contribute to an existing one", - "Integrations built with the Telemetry SDKs", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Preview access for New Relic One", "For more help" ], - "title": "Telemetry SDKs: Report custom telemetry data", - "category_0": "Telemetry Data Platform", + "title": "Preview access for New Relic One", + "category_0": "Licenses", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "category_1": "Product or service licenses", + "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", - "published_at": "2020-10-03T22:04:50Z", - "updated_at": "2020-09-17T14:37:52Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", + "published_at": "2020-10-04T06:02:04Z", + "updated_at": "2020-07-31T04:41:27Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", "document_type": "page", "popularity": 1, - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 165.87003, + "_score": 327.8681, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Telemetry SDKs: Report custom telemetry data", - "sections": "Telemetry SDKs: Report custom telemetry data", - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "category_0": "Telemetry Data Platform", - "category_2": "Ingest APIs", - "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" }, - "id": "5d89fefbe7b9d2537ed30dc1" + "id": "5f23a0f7e7b9d29da9c82305" }, { - "category_2": "Custom events", - "nodeid": 13806, + "category_2": "Data privacy", + "nodeid": 1591, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", + "Security and Privacy", + "Data privacy", + "Compliance", + "Information security", + "Security bulletins", + "Security controls for privacy", + "Secured content", + "Analytics", + "Data transmission and firewalls", + "Hosting and data storage", + "Data access", + "HTTP parameters disabled by default", "For more help" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "Security controls for privacy", + "category_0": "New Relic Security and Privacy", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "category_1": "Security and Privacy", + "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", + "published_at": "2020-10-04T07:08:53Z", + "updated_at": "2020-09-24T07:44:02Z", + "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.41689, + "_score": 323.04443, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Event data sources", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" - }, - "id": "5e8e7f9de7b9d2aa122cf0f6" - }, - { - "category_2": "Get started", - "nodeid": 36051, - "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Get data into New Relic", - "New Relic-built agents and integrations", - "Agent APIs", - "Telemetry SDKs", - "APIs for sending metrics, traces, logs, and events", - "New Relic One applications", - "For more help" - ], - "title": "Get data into New Relic", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", - "published_at": "2020-09-30T16:13:27Z", - "updated_at": "2020-08-10T23:16:39Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", - "document_type": "page", - "popularity": 1, - "info": "An introduction to how to get data into New Relic. ", - "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.936935, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "APIs for sending metrics, traces, logs, and events", - "category_0": "Telemetry Data Platform", - "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" + "sections": "Security and Privacy", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "category_0": "New Relic Security and Privacy", + "category_1": "Security and Privacy", + "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" }, - "id": "5f24aa60196a67ede394f5f3" - }, + "id": "5e30b8a864441f47ebd05cb0" + } + ], + "/collect-data/custom-events": [ { "category_2": "Custom events", "nodeid": 13661, @@ -1265,272 +840,206 @@ "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.28475, + "_score": 97.883804, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Additional Event API requirements", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "title": "Data requirements and limits for custom event data", + "sections": "Custom events", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", "category_1": "Event data sources", - "category_2": "Custom events", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, "id": "59f4354f4bb81c2ea8b80d0a" }, { - "category_2": "Java agent release notes", - "nodeid": 36271, + "category_2": "Logs in context with agent APIs", + "nodeid": 36921, "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 5.8.0", - "New features", - "New OSS SDK", - "Fixes" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Annotate logs for logs in context using APM agent APIs", + "APM agent trace metadata and linking metadata APIs", + "Resources for correctly annotating logs", + "For more help" ], - "title": "Java Agent 5.8.0", - "category_0": "Release notes", + "title": "Annotate logs for logs in context using APM agent APIs", + "category_0": "Log management", "type": "docs", - "category_1": "APM agent release notes", - "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "category_1": "Enable log management", + "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", - "published_at": "2020-10-03T22:39:52Z", - "updated_at": "2019-10-31T15:19:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", - "info": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", + "published_at": "2020-10-03T23:04:51Z", + "updated_at": "2020-09-27T21:36:25Z", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", + "document_type": "page", + "popularity": 1, + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 75.411766, + "_score": 85.86501, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Java Agent 5.8.0", - "sections": "APM agent release notes", - "category_1": "APM agent release notes", - "category_2": "Java agent release notes", - "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" + "title": "Annotate logs for logs in context using APM agent APIs", + "sections": "Logs in context with agent APIs", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "category_2": "Logs in context with agent APIs", + "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" }, - "id": "5dbafb88196a67d9b59aa23d" - } - ], - "/automate-workflows/automated-tagging": [ + "id": "5f37535c196a67c8c055e5ff" + }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Custom events", + "nodeid": 6256, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" + "Event data sources", + "Default events", + "Custom events", + "APM: Report custom events", + "Data considerations", + "Record a custom event", + "Timestamps", + "Limits and restricted characters", + "Reserved words", + "For more help" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "APM: Report custom events", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "published_at": "2020-10-03T15:13:27Z", + "updated_at": "2020-09-24T07:10:11Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "New Relic APM: how to report custom events and attributes.", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 205.177, + "_score": 71.15189, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate workflows", - "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "title": "APM: Report custom events", + "sections": "Custom events", + "info": "New Relic APM: how to report custom events and attributes.", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa999c196a67dfb4766445" + "id": "5f480a5a64441f578bfdcdb1" }, { - "category_2": "Get started", - "nodeid": 11261, + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", "For more help" ], - "title": "Integrations and managed policies", - "category_0": "Integrations", + "title": "Report custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 101.60765, + "_score": 56.2564, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" + "title": "Report custom event data", + "sections": "Custom events", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5d6c1f4828ccbce6928f6fe0" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Collect data from any source", + "Agent APIs", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API", + "Log API" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "title": "Collect data from any source", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.11351, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Automate common tasks", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "category_2": "Measure DevOps success", - "nodeid": 34966, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", - "For more help" - ], - "title": "Automate instrumentation", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-10-03T22:22:40Z", - "updated_at": "2020-09-28T01:04:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", - "document_type": "page", - "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 86.17361, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Automate instrumentation", - "sections": "Automate instrumentation", - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" - }, - "id": "5f5e0c14196a67e25fce6a8a" - }, - { - "category_2": "Examples", - "nodeid": 34236, - "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph tagging API tutorial", - "Read tags for an entity", - "Add tags for an entity", - "Remove a tag from an entity", - "Delete specific tag values for an entity", - "Replace all tag values for an entity", - "For more help" + "tags": [ + "Agent API", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API" ], - "title": "NerdGraph tagging API tutorial", - "category_0": "APIs", - "type": "docs", - "category_1": "NerdGraph", - "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", - "published_at": "2020-09-30T15:47:49Z", - "updated_at": "2020-07-26T05:41:24Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", + "published_at": "2020-10-04T02:06:16Z", + "updated_at": "2020-08-14T01:45:09Z", "document_type": "page", "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.94872, + "_score": 53.372566, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph tagging API tutorial", - "sections": "NerdGraph tagging API tutorial", - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" + "sections": "Agent APIs", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "tags": "Agent API", + "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" }, - "id": "5d8024fc28ccbcc5e9499cf1" + "id": "5efa997128ccbc3c9a307dfd" } ], "/build-apps/add-time-picker-guide": [ @@ -1543,32 +1052,32 @@ "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", + "Add the NerdGraphQuery component to an application", "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T02:16:58Z", "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 152.2066, + "_score": 153.64691, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "Build apps", "sections": "Add a time picker to your app", - "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, "id": "5efa999d64441fc0f75f7e21" }, @@ -1591,18 +1100,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T01:55:57Z", "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 152.07132, + "_score": 153.40387, "_version": null, "_explanation": null, "sort": null, @@ -1612,6 +1121,46 @@ }, "id": "5d6fe49a64441f8d6100a50f" }, + { + "sections": [ + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" + ], + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 121.90595, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "tags": "New Relic One apps", + "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" + }, + "id": "5efa989e28ccbc4071307de5" + }, { "sections": [ "Add tables to your New Relic One application", @@ -1633,7 +1182,7 @@ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-03T13:47:59Z", + "published_at": "2020-10-04T02:14:28Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -1641,7 +1190,7 @@ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.62802, + "_score": 121.27358, "_version": null, "_explanation": null, "sort": null, @@ -1654,46 +1203,6 @@ }, "id": "5efa989ee7b9d2ad567bab51" }, - { - "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-03T13:52:21Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.49266, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "New Relic One apps", - "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" - }, - "id": "5efa989e28ccbc4071307de5" - }, { "image": "", "url": "https://developer.newrelic.com/components/platform-state-context/", @@ -1702,7 +1211,7 @@ "Usage", "Props" ], - "published_at": "2020-10-03T13:50:10Z", + "published_at": "2020-10-04T02:10:38Z", "title": "PlatformStateContext", "updated_at": "2020-08-01T01:47:08Z", "type": "developer", @@ -1713,7 +1222,7 @@ "body": "PlatformStateContext Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.25096, + "_score": 97.87625, "_version": null, "_explanation": null, "sort": null, @@ -1726,882 +1235,1159 @@ "id": "5efa997128ccbccc6f307dc0" } ], - "/build-apps/add-query-mutate-data-nerdstorage": [ + "/automate-workflows/automated-tagging": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 410.7753, + "_score": 212.55954, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add, query, and mutate data using NerdStorage", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + "title": "Automate workflows", + "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", + "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa999c196a67dfb4766445" }, { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Intro to NerdStorage", + "published_at": "2020-10-04T01:55:57Z", + "title": "New Relic Developers", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-03T13:51:17Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.20842, + "_score": 100.295265, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to NerdStorage", - "sections": "Intro to NerdStorage", - "info": "Intro to NerdStorage on New Relic One", - "tags": "nerdstorage", - "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" + "sections": "Automate common tasks", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5d6fe49a64441f8d6100a50f" }, { + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Amazon integrations", + "Get started", + "AWS integrations list", + "Troubleshooting", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "Integrations and managed policies", + "category_0": "Integrations", + "type": "docs", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.12292, + "_score": 94.21665, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5d6c1f4828ccbce6928f6fe0" }, { + "category_2": "Examples", + "nodeid": 34236, "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" - ], - "title": "Query and store data", - "type": "developer", - "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" + "NerdGraph", + "Get started", + "Examples", + "NerdGraph tagging API tutorial", + "Read tags for an entity", + "Add tags for an entity", + "Remove a tag from an entity", + "Delete specific tag values for an entity", + "Replace all tag values for an entity", + "For more help" ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "title": "NerdGraph tagging API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-08-01T01:42:02Z", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", + "published_at": "2020-10-04T02:41:20Z", + "updated_at": "2020-07-26T05:41:24Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 80.095695, + "_score": 86.79772, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and store data", - "sections": "Query and store data", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" + "title": "NerdGraph tagging API tutorial", + "sections": "NerdGraph tagging API tutorial", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" }, - "id": "5efa989e28ccbc2f15307deb" + "id": "5d8024fc28ccbcc5e9499cf1" }, { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "category_2": "Measure DevOps success", + "nodeid": 34966, "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Build queries with NerdGraph", - "Collect data - any source", - "Query data with NRQL" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Automate instrumentation", + "Prerequisite", + "1. Make instrumentation part of every build", + "2. Take advantage of integrations and existing tools", + "3. Leverage the power of APIs", + "For more help" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Collect data", - "updated_at": "2020-10-03T02:05:02Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "title": "Automate instrumentation", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", + "published_at": "2020-10-03T22:22:40Z", + "updated_at": "2020-09-28T01:04:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 76.463806, + "_score": 85.55961, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Collect data", - "sections": "Query data with NRQL", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "Automate instrumentation", + "sections": "Automate instrumentation", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" }, - "id": "5efa997328ccbc768c307de2" + "id": "5f5e0c14196a67e25fce6a8a" } ], - "/collect-data/custom-attributes": [ + "/build-apps/publish-deploy": [ { "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Build queries with NerdGraph", - "Collect data - any source", - "Query data with NRQL" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Collect data", - "updated_at": "2020-10-03T02:05:02Z", + "published_at": "2020-10-04T02:16:58Z", + "title": "Build apps", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 154.10962, + "_score": 169.3906, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa997328ccbc768c307de2" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Measure DevOps success", - "nodeid": 16556, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: track experience indicators", - "Prerequisites", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Utilize data to separate performance by cohort and debug issues at the customer level", - "For more help" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "Customer experience improvement: track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-10-03T21:48:58Z", - "updated_at": "2020-09-27T21:45:56Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "title": "Permissions for managing applications", + "type": "developer", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" + ], + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-04T02:16:58Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 102.0789, + "_score": 59.429714, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "managing apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5f5adb2728ccbc7152532752" + "id": "5f45bf2864441ffb4dfdcdbb" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32796, + "category_2": "Hosting services", + "nodeid": 13151, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: Track experience indicators", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Use data to separate performance by cohort and debug issues at the customer level", - "For more help" - ], - "title": "Customer experience improvement: Track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-09-30T16:45:19Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "Node.js agent", + "Getting started", + "Installation and configuration", + "Supported features", + "Attributes", + "API guides", + "Hosting services", + "Troubleshooting", + "Install New Relic Node.js agent in GAE flexible environment", + "Use native deploy", + "Build a custom runtime", + "Optional: Disable health checks", + "Get New Relic agent troubleshooting logs from GAE", + "For more help" + ], + "title": "Install New Relic Node.js agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Node.js agent", + "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:40:01Z", + "updated_at": "2020-08-18T06:29:37Z", + "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", "document_type": "page", "popularity": 1, - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 101.874146, + "_score": 31.68496, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: Track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" + "sections": "Use native deploy", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" }, - "id": "5f5ac17528ccbce4f0532733" + "id": "5972fea707552313d3f9ba8d" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Hosting services", + "nodeid": 13866, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Python agent", + "Getting started", + "Installation", + "Configuration", + "Supported features", + "Back-end services", + "Custom instrumentation", + "API guides", + "Python agent API", + "Web frameworks and servers", + "Hosting services", + "Attributes", + "Troubleshooting", + "Install the Python agent in GAE flexible environment", + "Deploy using GAE's native support", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Install the Python agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Python agent", + "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:11:18Z", + "updated_at": "2020-08-30T17:24:26Z", + "breadcrumb": "Contents / APM agents / Python agent / Hosting services", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.6042, + "_score": 21.474327, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" + "sections": "Deploy using GAE's native support", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5f3fb624196a672fda1cd4a3" }, { - "category_2": "Browser agent release notes", - "nodeid": 40791, + "category_2": "Installation", + "nodeid": 13121, "sections": [ - "Browser agent release notes", - "Browser Agent v1184", - "Release Dates", - "New Features", - "Added support for custom attributes on PageViewTiming events", - "Issue Resolutions", - "How to upgrade your agent" + "Go agent", + "Get started", + "Installation", + "Configuration", + "Instrumentation", + "API guides", + "Features", + "Troubleshooting", + "Install the Go agent in GAE flexible environment", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "title": "Browser Agent v1184", - "category_0": "Release notes", + "title": "Install the Go agent in GAE flexible environment", + "category_0": "APM agents", "type": "docs", - "category_1": "Browser agent release notes", - "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", + "category_1": "Go agent", + "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", - "published_at": "2020-10-03T14:39:21Z", - "updated_at": "2020-10-02T05:37:45Z", - "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", - "info": "", + "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", + "published_at": "2020-10-03T17:53:58Z", + "updated_at": "2020-08-15T09:48:00Z", + "breadcrumb": "Contents / APM agents / Go agent / Installation", + "document_type": "page", + "popularity": 1, + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 95.85435, + "_score": 19.89228, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Added support for custom attributes on PageViewTiming events", - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" }, - "id": "5f76bca928ccbcaa75337d9b" + "id": "5f37af50196a67d8f955e63e" } ], - "/terms": [ + "/explore-docs/nr1-cli": [ { - "category_2": "Product definitions", - "nodeid": 39646, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "License information", - "General usage licenses", - "Special services licenses", - "Distributed licenses", - "Referenced policies", - "Product definitions", - "Usage plans", - "FAQ", - "New Relic One pricing: Definitions", - "For more help" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "title": "New Relic One pricing: Definitions", - "category_0": "Licenses", - "type": "docs", - "category_1": "License information", - "external_id": "097fc095ef18942f3af1845237742340e36416b8", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-09-10T14:58:10Z", - "breadcrumb": "Contents / Licenses / License information / Product definitions", + "published_at": "2020-10-04T02:14:29Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", + "type": "developer", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 355.7281, + "_score": 111.674515, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5f23b039196a67030b94f5c4" + "id": "5f28bd6a64441f9817b11a38" }, { - "image": "", - "url": "https://opensource.newrelic.com/cla/", "sections": [ - "NEW RELIC, INC.", - "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", - "Definitions." + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "published_at": "2020-10-03T14:06:10Z", - "title": "New Relic Open Source Contributor License Agreement", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 347.55396, + "_score": 100.45778, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" }, - "id": "5f31822264441fcbe056a984" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Developer Edition", - "nodeid": 39641, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Developer Program Resources", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Developer Program Resources", - "category_0": "Licenses", - "type": "docs", - "category_1": "Product or service licenses", - "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-08-08T19:17:02Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "New Relic Developer edition policy", - "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 343.63434, + "_score": 68.01043, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" }, - "id": "5f338507e7b9d2f670c9de83" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Data privacy", - "nodeid": 1591, "sections": [ - "Security and Privacy", - "Data privacy", - "Compliance", - "Information security", - "Security bulletins", - "Security controls for privacy", - "Secured content", - "Analytics", - "Data transmission and firewalls", - "Hosting and data storage", - "Data access", - "HTTP parameters disabled by default", - "For more help" + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Security controls for privacy", - "category_0": "New Relic Security and Privacy", - "type": "docs", - "category_1": "Security and Privacy", - "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "title": "Set up your development environment", + "type": "developer", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" + ], + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", - "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", - "published_at": "2020-10-03T21:19:32Z", - "updated_at": "2020-09-24T07:44:02Z", - "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-04T02:07:32Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 339.96112, + "_score": 52.33963, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Security and Privacy", - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "category_0": "New Relic Security and Privacy", - "category_1": "Security and Privacy", - "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5e30b8a864441f47ebd05cb0" + "id": "5efa9973e7b9d242237bab39" }, { - "category_2": "New Relic One", - "nodeid": 39366, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Preview access for New Relic One", - "For more help" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "title": "Preview access for New Relic One", - "category_0": "Licenses", - "type": "docs", - "category_1": "Product or service licenses", - "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", - "published_at": "2020-10-01T14:37:40Z", - "updated_at": "2020-07-31T04:41:27Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 335.26248, + "_score": 48.150394, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "New Relic One CLI", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5f23a0f7e7b9d29da9c82305" + "id": "5efa989e196a671300766404" } ], - "/build-apps/publish-deploy": [ + "/collect-data/collect-data-from-any-source": [ { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Ingest APIs", + "nodeid": 35471, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Telemetry SDKs: Report custom telemetry data", + "Requirements and compatibility", + "Available libraries", + "Write your own Telemetry SDK or contribute to an existing one", + "Integrations built with the Telemetry SDKs", + "For more help" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Telemetry SDKs: Report custom telemetry data", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", + "published_at": "2020-10-03T22:04:50Z", + "updated_at": "2020-09-17T14:37:52Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 168.08011, + "_score": 160.75787, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "Telemetry SDKs: Report custom telemetry data", + "sections": "Telemetry SDKs: Report custom telemetry data", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "category_0": "Telemetry Data Platform", + "category_2": "Ingest APIs", + "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5d89fefbe7b9d2537ed30dc1" }, { + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" - ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-09-02T02:04:41Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 59.916683, + "_score": 97.70073, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "managing apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "title": "Report custom event data", + "sections": "Event data sources", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f45bf2864441ffb4dfdcdbb" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "category_2": "Hosting services", - "nodeid": 13151, + "category_2": "Get started", + "nodeid": 36051, "sections": [ - "Node.js agent", - "Getting started", - "Installation and configuration", - "Supported features", - "Attributes", - "API guides", - "Hosting services", - "Troubleshooting", - "Install New Relic Node.js agent in GAE flexible environment", - "Use native deploy", - "Build a custom runtime", - "Optional: Disable health checks", - "Get New Relic agent troubleshooting logs from GAE", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Get data into New Relic", + "New Relic-built agents and integrations", + "Agent APIs", + "Telemetry SDKs", + "APIs for sending metrics, traces, logs, and events", + "New Relic One applications", "For more help" ], - "title": "Install New Relic Node.js agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Get data into New Relic", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "Node.js agent", - "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", + "category_1": "Ingest and manage data", + "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", "image": "", - "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:40:01Z", - "updated_at": "2020-08-18T06:29:37Z", - "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", + "published_at": "2020-10-04T03:02:05Z", + "updated_at": "2020-08-10T23:16:39Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", "document_type": "page", "popularity": 1, - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An introduction to how to get data into New Relic. ", + "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 31.452888, + "_score": 97.27927, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use native deploy", - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + "sections": "APIs for sending metrics, traces, logs, and events", + "category_0": "Telemetry Data Platform", + "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" }, - "id": "5972fea707552313d3f9ba8d" + "id": "5f24aa60196a67ede394f5f3" }, { - "category_2": "Hosting services", - "nodeid": 13866, + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Python agent", - "Getting started", - "Installation", - "Configuration", - "Supported features", - "Back-end services", - "Custom instrumentation", - "API guides", - "Python agent API", - "Web frameworks and servers", - "Hosting services", - "Attributes", - "Troubleshooting", - "Install the Python agent in GAE flexible environment", - "Deploy using GAE's native support", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "Install the Python agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Python agent", - "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:11:18Z", - "updated_at": "2020-08-30T17:24:26Z", - "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 21.4074, + "_score": 86.05269, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Deploy using GAE's native support", - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + "title": "Data requirements and limits for custom event data", + "sections": "Additional Event API requirements", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f3fb624196a672fda1cd4a3" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "category_2": "Installation", - "nodeid": 13121, + "category_2": "Java agent release notes", + "nodeid": 36271, "sections": [ - "Go agent", - "Get started", - "Installation", - "Configuration", - "Instrumentation", - "API guides", - "Features", - "Troubleshooting", - "Install the Go agent in GAE flexible environment", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 5.8.0", + "New features", + "New OSS SDK", + "Fixes" ], - "title": "Install the Go agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Java Agent 5.8.0", + "category_0": "Release notes", "type": "docs", - "category_1": "Go agent", - "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "category_1": "APM agent release notes", + "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", "image": "", - "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", - "published_at": "2020-10-03T17:53:58Z", - "updated_at": "2020-08-15T09:48:00Z", - "breadcrumb": "Contents / APM agents / Go agent / Installation", - "document_type": "page", - "popularity": 1, - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", + "published_at": "2020-10-03T22:39:52Z", + "updated_at": "2019-10-31T15:19:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 19.775082, + "_score": 74.00528, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + "title": "Java Agent 5.8.0", + "sections": "APM agent release notes", + "category_1": "APM agent release notes", + "category_2": "Java agent release notes", + "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" }, - "id": "5f37af50196a67d8f955e63e" + "id": "5dbafb88196a67d9b59aa23d" } ], - "/explore-docs/newrelic-cli": [ + "/build-apps/howto-use-nrone-table-components": [ { "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://developer.newrelic.com/components/table-header-cell/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" + "TableHeaderCell", + "Usage", + "Props" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", + "published_at": "2020-10-04T02:13:34Z", + "title": "TableHeaderCell", + "updated_at": "2020-08-03T04:46:36Z", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 819.5237, + "_score": 522.06494, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + "title": "TableHeaderCell", + "sections": "TableHeaderCell", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component." }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa9906196a67523e76646e" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "image": "", + "url": "https://developer.newrelic.com/components/table-row/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "TableRow", + "Usage", + "Props" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "published_at": "2020-10-04T02:13:34Z", + "title": "TableRow", + "updated_at": "2020-08-03T04:45:42Z", + "type": "developer", + "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", + "document_type": "page", + "popularity": 1, + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 431.76508, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "TableRow", + "sections": "TableRow", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component." + }, + "id": "5efa98d564441f93435f7e24" + }, + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-04T02:16:58Z", + "title": "Build apps", + "updated_at": "2020-10-04T02:16:57Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 421.43872, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + }, + "id": "5efa999d64441fc0f75f7e21" + }, + { + "category_2": "Cloud adoption", + "nodeid": 16121, + "sections": [ + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Create application baselines", + "1. Identify components", + "2. Determine compatibility", + "3. Deploy monitoring", + "4. Gather metrics", + "5. Set up Dashboards", + "Expert tips", + "For more help" + ], + "title": "Create application baselines", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", + "image": "", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", + "published_at": "2020-10-03T21:26:31Z", + "updated_at": "2020-09-27T20:07:57Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 293.6967, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Create application baselines", + "sections": "1. Identify components", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" + }, + "id": "5ad48685c75d0766faa181bd" + }, + { + "sections": [ + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" + ], + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-04T02:14:58Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", + "popularity": 1, + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 291.01334, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Map page views by region in a custom app", + "sections": "Import the TableChart component", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" + }, + "id": "5efa993c196a67066b766469" + } + ], + "/explore-docs/newrelic-cli": [ + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 821.24097, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", + "sections": [ + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-04T01:55:57Z", + "title": "New Relic Developers", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 818.796, + "_score": 820.3031, "_version": null, "_explanation": null, "sort": null, @@ -2643,7 +2429,7 @@ "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 738.969, + "_score": 712.25256, "_version": null, "_explanation": null, "sort": null, @@ -2656,6 +2442,49 @@ }, "id": "5f5e0c14196a67e25fce6a8a" }, + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 577.55164, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + }, + "id": "5efa989e28ccbc535a307dd0" + }, { "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", "url": "https://developer.newrelic.com/nerd-days/", @@ -2725,7 +2554,7 @@ "Closing + Swag", "Engage with the developer community" ], - "published_at": "2020-10-03T13:53:28Z", + "published_at": "2020-10-04T02:18:25Z", "title": "New Relic Developers", "updated_at": "2020-10-03T02:00:34Z", "type": "developer", @@ -2736,7 +2565,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 598.24524, + "_score": 554.49316, "_version": null, "_explanation": null, "sort": null, @@ -2746,49 +2575,224 @@ "body": " of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes" }, "id": "5f3dd5bf28ccbc2349f56e4e" - }, + } + ], + "/automate-workflows/get-started-new-relic-cli": [ { - "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", + "sections": [ + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-04T01:55:57Z", + "title": "New Relic Developers", + "updated_at": "2020-10-04T01:48:35Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 330.92087, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + }, + "id": "5d6fe49a64441f8d6100a50f" + }, + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 310.7852, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "sections": [ + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Next steps" ], - "title": "New Relic One CLI reference", + "title": "Quickly tag a set of resources", "type": "developer", "tags": [ - "New Relic One app", - "nerdpack commands" + "tags", + "new relic CLI" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-04T02:06:15Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 585.3855, + "_score": 181.16687, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "title": "Quickly tag a set of resources", + "sections": "Install the New Relic CLI", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5efa999d64441fa74a5f7e2d" + }, + { + "category_2": "Troubleshooting", + "nodeid": 40351, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Tag information not showing up for entity in Infra alert condition", + "Problem", + "Solution", + "Cause", + "For more help" + ], + "title": "Tag information not showing up for entity in Infra alert condition", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", + "published_at": "2020-10-03T15:59:21Z", + "updated_at": "2020-09-30T09:38:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", + "document_type": "troubleshooting_doc", + "popularity": 1, + "info": "Tags from events not indexed by New Relic do not appear.", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 161.82, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Tag information not showing up for entity in Infra alert condition", + "sections": "New Relic Alerts", + "info": "Tags from events not indexed by New Relic do not appear.", + "category_1": "New Relic Alerts", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + }, + "id": "5f4c3992e7b9d2c2d203eddd" + }, + { + "category_2": "Alerts release notes", + "nodeid": 40771, + "sections": [ + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "Component: Violation Tags", + "Update:" + ], + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_0": "Release notes", + "type": "docs", + "category_1": "New Relic Platform release notes", + "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", + "published_at": "2020-10-03T19:08:20Z", + "updated_at": "2020-09-29T16:10:16Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", + "popularity": 1, + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 159.57465, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_1": "New Relic Platform release notes", + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + }, + "id": "5f735c6928ccbc5f5d337dbb" } ], "/explore-docs/nerdstorage": [ @@ -2801,25 +2805,25 @@ "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", + "Add the NerdGraphQuery component to an application", "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T02:16:58Z", "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 415.28625, + "_score": 427.71838, "_version": null, "_explanation": null, "sort": null, @@ -2852,7 +2856,7 @@ "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", - "published_at": "2020-10-03T13:47:59Z", + "published_at": "2020-10-04T02:15:55Z", "updated_at": "2020-08-30T01:49:16Z", "document_type": "page", "popularity": 1, @@ -2860,7 +2864,7 @@ "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 264.67572, + "_score": 270.7021, "_version": null, "_explanation": null, "sort": null, @@ -2895,7 +2899,7 @@ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-03T13:52:21Z", + "published_at": "2020-10-04T02:12:13Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -2903,7 +2907,7 @@ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 187.5668, + "_score": 194.9497, "_version": null, "_explanation": null, "sort": null, @@ -2929,7 +2933,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:13:34Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -2937,7 +2941,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 173.45467, + "_score": 179.55063, "_version": null, "_explanation": null, "sort": null, @@ -2972,7 +2976,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -2980,7 +2984,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 135.3389, + "_score": 143.31711, "_version": null, "_explanation": null, "sort": null, @@ -2994,41 +2998,251 @@ "id": "5efa989e28ccbc535a307dd0" } ], - "/explore-docs/nr1-nerdpack": [ + "/explore-docs/nr1-common": [ { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", "sections": [ - "New Relic One CLI subscription commands", - "Command details", - "nr1 subscription:set", - "Subscribe to a Nerdpack", - "Usage", - "Options", - "Aliases", - "nr1 subscription:list", - "See your subscription", - "nr1 subscription:unset", - "Unsubscribe from a Nerdpack" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "published_at": "2020-10-03T13:52:22Z", - "title": "New Relic One CLI subscription commands", - "updated_at": "2020-08-06T01:44:54Z", + "title": "New Relic One CLI reference", "type": "developer", - "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 788.7394, + "_score": 201.90358, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI subscription commands", - "sections": "New Relic One CLI subscription commands", + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + }, + "id": "5efa989e28ccbc535a307dd0" + }, + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 165.71976, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", + "sections": [ + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-04T01:55:57Z", + "title": "New Relic Developers", + "updated_at": "2020-10-04T01:48:35Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 150.58218, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + }, + "id": "5d6fe49a64441f8d6100a50f" + }, + { + "category_2": "Troubleshooting", + "nodeid": 13726, + "sections": [ + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" + ], + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 136.89398, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" + }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 131.93639, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + } + ], + "/explore-docs/nr1-nerdpack": [ + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "sections": [ + "New Relic One CLI subscription commands", + "Command details", + "nr1 subscription:set", + "Subscribe to a Nerdpack", + "Usage", + "Options", + "Aliases", + "nr1 subscription:list", + "See your subscription", + "nr1 subscription:unset", + "Unsubscribe from a Nerdpack" + ], + "published_at": "2020-10-04T02:14:28Z", + "title": "New Relic One CLI subscription commands", + "updated_at": "2020-08-06T01:44:54Z", + "type": "developer", + "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 779.20355, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI subscription commands", + "sections": "New Relic One CLI subscription commands", "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" }, @@ -3058,7 +3272,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-03T13:52:21Z", + "published_at": "2020-10-04T02:15:08Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -3069,7 +3283,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 556.40906, + "_score": 548.70337, "_version": null, "_explanation": null, "sort": null, @@ -3103,7 +3317,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3111,7 +3325,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 285.33502, + "_score": 285.4889, "_version": null, "_explanation": null, "sort": null, @@ -3137,7 +3351,7 @@ "nr1 catalog:submit", "Send info to the catalog" ], - "published_at": "2020-10-03T13:51:17Z", + "published_at": "2020-10-04T02:13:34Z", "title": "New Relic One CLI catalog commands", "updated_at": "2020-08-14T01:49:24Z", "type": "developer", @@ -3148,7 +3362,7 @@ "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 158.70357, + "_score": 157.33795, "_version": null, "_explanation": null, "sort": null, @@ -3183,7 +3397,7 @@ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-03T13:53:28Z", + "published_at": "2020-10-04T02:12:13Z", "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, @@ -3191,7 +3405,7 @@ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 146.5722, + "_score": 148.38692, "_version": null, "_explanation": null, "sort": null, @@ -3205,7 +3419,7 @@ "id": "5efa989e196a671300766404" } ], - "/explore-docs/nr1-common": [ + "/explore-docs/nr1-catalog": [ { "sections": [ "New Relic One CLI reference", @@ -3228,7 +3442,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3236,7 +3450,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 205.41022, + "_score": 292.65353, "_version": null, "_explanation": null, "sort": null, @@ -3245,44 +3459,10 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, "id": "5efa989e28ccbc535a307dd0" }, - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 163.94238, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" - }, - "id": "5efa999c196a67dfb4766445" - }, { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -3302,298 +3482,31 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T01:55:57Z", "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 150.48306, + "_score": 198.97215, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic Developers", "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", - "For more help" - ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", - "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 148.66782, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" - }, - "id": "5e9af5ba28ccbc3d4fd94a21" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.14163, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - } - ], - "/explore-docs/nr1-cli": [ - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", - "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" - ], - "published_at": "2020-10-03T13:52:22Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", - "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.662766, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" - }, - "id": "5f28bd6a64441f9817b11a38" - }, - { - "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-03T13:51:17Z", - "updated_at": "2020-09-08T01:50:19Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.04282, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" - }, - "id": "5efa989ee7b9d2048e7bab92" - }, - { - "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-03T13:52:21Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 63.340195, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" - }, - "id": "5efa989e28ccbc4071307de5" - }, - { - "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-08-26T01:47:20Z", - "document_type": "page", - "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 47.957104, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" - }, - "id": "5efa9973e7b9d242237bab39" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ "New Relic One CLI common commands", "Command details", @@ -3615,7 +3528,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-03T13:52:21Z", + "published_at": "2020-10-04T02:15:08Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -3626,150 +3539,64 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 46.10025, + "_score": 168.24901, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, "id": "5f28bd6ae7b9d267996ade94" - } - ], - "/explore-docs/nr1-catalog": [ + }, { "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "New Relic One CLI reference", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 288.40375, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" - }, - "id": "5efa989e28ccbc535a307dd0" - }, - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", - "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-03T13:45:46Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T01:47:47Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 10 Days : 14 Hours : 54 Minutes : 33 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 197.41147, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", - "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" ], - "published_at": "2020-10-03T13:52:21Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 167.05153, + "_score": 139.60403, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5efa999de7b9d283e67bab8f" }, { "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", @@ -3840,7 +3667,7 @@ "Closing + Swag", "Engage with the developer community" ], - "published_at": "2020-10-03T13:53:28Z", + "published_at": "2020-10-04T02:18:25Z", "title": "New Relic Developers", "updated_at": "2020-10-03T02:00:34Z", "type": "developer", @@ -3851,7 +3678,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 145.9299, + "_score": 135.93369, "_version": null, "_explanation": null, "sort": null, @@ -3861,53 +3688,6 @@ "body": " Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie" }, "id": "5f3dd5bf28ccbc2349f56e4e" - }, - { - "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" - ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" - ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-03T13:47:59Z", - "updated_at": "2020-09-02T02:05:55Z", - "document_type": "page", - "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.53897, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" - }, - "id": "5efa999de7b9d283e67bab8f" } ], "/collect-data/get-started-nerdgraph-api-explorer": [ @@ -3933,7 +3713,7 @@ "external_id": "f4b228fbc3fdc408adc6d7e10a93edd0464b7762", "image": "", "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/use-nerdgraph-manage-license-keys-personal-api-keys", - "published_at": "2020-09-30T09:44:44Z", + "published_at": "2020-10-04T05:53:46Z", "updated_at": "2020-09-24T10:26:23Z", "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", @@ -3942,7 +3722,7 @@ "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 222.40268, + "_score": 221.17136, "_version": null, "_explanation": null, "sort": null, @@ -3956,39 +3736,6 @@ }, "id": "5efe0487196a6710b1766452" }, - { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", - "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Build queries with NerdGraph", - "Collect data - any source", - "Query data with NRQL" - ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Collect data", - "updated_at": "2020-10-03T02:05:02Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", - "document_type": "page", - "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.26994, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Build queries with NerdGraph", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 15 min Collect data - any source APIs, agents, OS emitters - get any data 10 min Query data with NRQL Query default data, custom events, and attributes" - }, - "id": "5efa997328ccbc768c307de2" - }, { "nodeid": 37751, "sections": [ @@ -4017,7 +3764,7 @@ "external_id": "017d6c34d340b9bc035e91483d675915fa5252eb", "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/alerts_query_0.png", "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-examples", - "published_at": "2020-10-01T14:32:20Z", + "published_at": "2020-10-04T05:10:10Z", "updated_at": "2020-08-11T04:59:00Z", "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", "document_type": "page", @@ -4026,7 +3773,7 @@ "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 152.88045, + "_score": 155.96222, "_version": null, "_explanation": null, "sort": null, @@ -4036,261 +3783,91 @@ "info": "Read about how you can manage alerts conditions, policies, and muting rules using NerdGraph.", "body": " Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing", "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" - }, - "id": "5f2dbad864441fd15456a9eb" - }, - { - "category_2": "Examples", - "nodeid": 17141, - "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph cloud integrations API tutorial", - "Requirements", - "Access the NerdGraph GraphiQL explorer", - "Query examples", - "Mutation examples", - "Enable an Amazon AWS integration", - "Change polling interval for Amazon AWS integration", - "Disable Amazon AWS integration", - "For more help" - ], - "title": "NerdGraph cloud integrations API tutorial", - "category_0": "APIs", - "type": "docs", - "category_1": "NerdGraph", - "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", - "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", - "published_at": "2020-10-03T22:02:24Z", - "updated_at": "2020-08-10T23:22:01Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.88008, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "NerdGraph cloud integrations API tutorial", - "sections": "NerdGraph", - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "category_1": "NerdGraph", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", - "breadcrumb": "Contents / APIs / NerdGraph / Examples" - }, - "id": "5d83537b28ccbc263a1b7bf7" - }, - { - "nodeid": 37711, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "NerdGraph API: NRQL condition alerts", - "Steps to create a NRQL condition", - "NRQL static condition", - "NRQL baseline condition", - "NRQL outlier condition", - "Update a condition", - "Update mutations", - "List and filter NRQL conditions", - "Singular NRQL condition queries", - "Update the description", - "Delete conditions", - "For more help" - ], - "title": "NerdGraph API: NRQL condition alerts ", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", - "published_at": "2020-09-30T12:24:16Z", - "updated_at": "2020-08-11T04:56:49Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", - "document_type": "page", - "popularity": 1, - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.53827, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "NerdGraph API: NRQL condition alerts ", - "sections": "Update mutations", - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" - }, - "id": "5f2dee1128ccbc562e88dfc1" - } - ], - "/automate-workflows/get-started-terraform": [ - { - "category_2": "Using monitors", - "nodeid": 6371, - "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Alerts for synthetic monitoring", - "Add a synthetic monitor to alert policies", - "Existing monitor: Remove from alert policy", - "Receive alert notifications on a three-strike basis", - "Mute (disable) monitor's alert notifications", - "For more help" - ], - "title": "Alerts for synthetic monitoring", - "category_0": "Synthetic monitoring", - "type": "docs", - "category_1": "Synthetic monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", - "image": "", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "published_at": "2020-10-03T15:27:33Z", - "updated_at": "2020-10-03T15:27:33Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", - "document_type": "page", - "popularity": 1, - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 176.44135, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Alerts for synthetic monitoring", - "sections": "Mute (disable) monitor's alert notifications", - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "category_0": "Synthetic monitoring", - "category_1": "Synthetic monitoring", - "category_2": "Using monitors", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "body": " alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" - }, - "id": "5f31b60e196a6742d2fbd6c8" - }, - { - "category_2": "Measure DevOps success", - "nodeid": 16501, - "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Incident orchestration: Align teams, tools, processes", - "Prerequisites", - "1. Assign first responders to team dashboards", - "2. Determine incident thresholds for alert conditions", - "3. Ensure alerts have auditable notification channels", - "4. Automate triage and resolution steps", - "For more help" - ], - "title": "Incident orchestration: Align teams, tools, processes", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", + }, + "id": "5f2dbad864441fd15456a9eb" + }, + { "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", - "published_at": "2020-10-03T21:47:40Z", - "updated_at": "2020-09-28T00:43:51Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "url": "https://developer.newrelic.com/collect-data/", + "sections": [ + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Collect data - any source", + "Create custom events", + "Build queries with NerdGraph", + "Query data with NRQL" + ], + "published_at": "2020-10-04T02:07:32Z", + "title": "Collect data", + "updated_at": "2020-10-04T02:07:32Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", - "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.48256, + "_score": 153.17467, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "3. Ensure alerts have auditable notification channels", - "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" + "sections": "Build queries with NerdGraph", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5f5b2113e7b9d2249dacfd34" + "id": "5efa997328ccbc768c307de2" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32791, + "category_2": "Examples", + "nodeid": 17141, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Set proactive alerts and align teams, tools, and processes for incident response", - "Prerequisites", - "1. Define policies", - "2. Set specific alerts", - "3. Identify groups", - "4. Determine thresholds", - "5. Set notification channels", - "6. Automate resolution", - "7. Establish reviews", - "8. Fine-tune process", - "Expert tip", + "NerdGraph", + "Get started", + "Examples", + "NerdGraph cloud integrations API tutorial", + "Requirements", + "Access the NerdGraph GraphiQL explorer", + "Query examples", + "Mutation examples", + "Enable an Amazon AWS integration", + "Change polling interval for Amazon AWS integration", + "Disable Amazon AWS integration", "For more help" ], - "title": "Set proactive alerts and align teams, tools, and processes for incident response ", - "category_0": "New Relic solutions", + "title": "NerdGraph cloud integrations API tutorial", + "category_0": "APIs", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "6040cb4f86b1533eb31ac0e71e58709d77f79b50", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/proactive-baseline-alerts-devops_0.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/set-proactive-alerts-align-teams-tools-processes-incident-response", - "published_at": "2020-09-30T16:44:13Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "category_1": "NerdGraph", + "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", + "image": "", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", + "published_at": "2020-10-03T22:02:24Z", + "updated_at": "2020-08-10T23:22:01Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "Using New Relic's proactive alerting, you can spend less time firefighting and more time deploying significant changes to your product.", - "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.78763, + "_score": 122.75859, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "5. Set notification channels", - "body": " acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create" + "title": "NerdGraph cloud integrations API tutorial", + "sections": "NerdGraph", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "category_1": "NerdGraph", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", + "breadcrumb": "Contents / APIs / NerdGraph / Examples" }, - "id": "5f5ac17764441ff9d5e067ec" + "id": "5d83537b28ccbc263a1b7bf7" }, { - "category_2": "Alert notifications", - "nodeid": 6491, + "nodeid": 37711, "sections": [ "New Relic Alerts", "Get started", @@ -4303,665 +3880,752 @@ "Rules, limits, and glossary", "Alerts and Nerdgraph", "REST API alerts", - "Test alert notification channels", - "Request the test", - "Troubleshoot the test results", + "NerdGraph API: NRQL condition alerts", + "Steps to create a NRQL condition", + "NRQL static condition", + "NRQL baseline condition", + "NRQL outlier condition", + "Update a condition", + "Update mutations", + "List and filter NRQL conditions", + "Singular NRQL condition queries", + "Update the description", + "Delete conditions", "For more help" ], - "title": "Test alert notification channels", + "title": "NerdGraph API: NRQL condition alerts ", "category_0": "Alerts and Applied Intelligence", "type": "docs", "category_1": "New Relic Alerts", - "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", + "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", - "published_at": "2020-09-30T10:06:26Z", - "updated_at": "2020-08-11T04:16:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", + "published_at": "2020-10-04T05:11:59Z", + "updated_at": "2020-08-11T04:56:49Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", "document_type": "page", "popularity": 1, - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.05412, + "_score": 121.24791, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Test alert notification channels", - "sections": "Test alert notification channels", - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "category_2": "Alert notifications", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" + "title": "NerdGraph API: NRQL condition alerts ", + "sections": "Update mutations", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" }, - "id": "5f2dbb3664441fd3a556a97c" + "id": "5f2dee1128ccbc562e88dfc1" + } + ], + "/build-apps/permission-manage-apps": [ + { + "category_2": "Original users and roles", + "nodeid": 1101, + "sections": [ + "Original accounts and billing", + "Original product-based pricing", + "Original users and roles", + "SAML SSO (original users)", + "Original data retention", + "Original pricing plan usage", + "Users and roles (original user model)", + "View and manage users", + "User types: basic user and full user", + "Account roles", + "Add-on roles", + "Account permissions", + "Alert permissions", + "APM permissions", + "Browser permissions", + "Infrastructure permissions", + "Insights permissions", + "Mobile permissions", + "Synthetics permissions", + "Workloads", + "For more help" + ], + "title": "Users and roles (original user model)", + "category_0": "New Relic accounts", + "type": "docs", + "category_1": "Original accounts and billing", + "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", + "published_at": "2020-10-03T17:04:51Z", + "updated_at": "2020-10-03T17:04:51Z", + "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "document_type": "page", + "popularity": 1, + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 170.47983, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Account permissions", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" + }, + "id": "5f3e194028ccbc18c7f56de3" }, { - "category_2": "Alert notifications", - "nodeid": 6481, + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "New Relic Alerts", + "Amazon integrations", "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", + "AWS integrations list", "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Update alert notification channels", - "Reference for updating channels", - "Basic process", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", "For more help" ], - "title": "Update alert notification channels", - "category_0": "Alerts and Applied Intelligence", + "title": "Integrations and managed policies", + "category_0": "Integrations", "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "ee8bce401d0623e8b85d84a6a20bd8a72b9764ef", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/update-alert-notification-channels", - "published_at": "2020-09-30T10:06:25Z", - "updated_at": "2020-08-11T06:42:27Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "Read about how to update alerts notification channels. ", - "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 84.05259, + "_score": 116.60466, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Update alert notification channels", - "sections": "Update alert notification channels", - "info": "Read about how to update alerts notification channels. ", - "category_2": "Alert notifications", - "body": " to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add" + "title": "Integrations and managed policies", + "sections": "Option 2: Manually add permissions", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" }, - "id": "5f2dbad928ccbcb8ca88dfed" - } - ], - "/automate-workflows/get-started-kubernetes": [ - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" + "id": "5d6c1f4828ccbce6928f6fe0" + }, + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", + "published_at": "2020-10-04T02:16:58Z", + "title": "Build apps", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.6518, + "_score": 92.88399, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using the Kubernetes operator", - "body": " it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "title": "Build apps", + "sections": "Permissions for managing applications", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Alert conditions", - "nodeid": 9231, + "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", + "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" + "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "About this Learncast", + "Prerequisites", + "Virtual Training Session List" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", - "document_type": "page", + "published_at": "2020-10-04T01:58:34Z", + "title": "Live Learncast: New Relic One Programmability", + "updated_at": "2020-07-31T01:40:49Z", + "type": "", + "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.00552, + "_score": 90.57933, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "Create NRQL alert conditions", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5dc618cbe7b9d2a0a8e4649c" }, { - "category_2": "Alerts release notes", - "nodeid": 40776, "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "Component: NRQL Conditions (Review Required)", - "Announcing : New Relic One Streaming Alerts", - "Please read the full announcement and FAQ here , and follow the links to enroll." + "Serve, publish, and deploy your New Relic One app", + "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "74ae41c7360962287ea605016bf7731035382166", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", - "published_at": "2020-10-03T14:38:29Z", - "updated_at": "2020-09-29T22:06:08Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "title": "Serve, publish, and deploy your New Relic One app", + "type": "developer", + "tags": [ + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-02T02:05:55Z", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", - "info": "", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 101.36392, + "_score": 78.55923, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_2": "Alerts release notes", - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Add images and metadata to your apps", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" }, - "id": "5f735c6964441f8a6aeb7297" - }, + "id": "5efa999de7b9d283e67bab8f" + } + ], + "/automate-workflows/get-started-terraform": [ { - "category_2": "Alert conditions", - "nodeid": 7261, + "category_2": "Using monitors", + "nodeid": 6371, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Set thresholds for an alert condition", - "What is a threshold?", - "View and set thresholds", + "Alerts for synthetic monitoring", + "Add a synthetic monitor to alert policies", + "Existing monitor: Remove from alert policy", + "Receive alert notifications on a three-strike basis", + "Mute (disable) monitor's alert notifications", "For more help" ], - "title": "Set thresholds for an alert condition", - "category_0": "Alerts and Applied Intelligence", + "title": "Alerts for synthetic monitoring", + "category_0": "Synthetic monitoring", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", + "category_1": "Synthetic monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "published_at": "2020-10-03T18:47:38Z", - "updated_at": "2020-09-30T13:34:48Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "published_at": "2020-10-03T15:27:33Z", + "updated_at": "2020-10-03T15:27:33Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", "document_type": "page", "popularity": 1, - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 95.032394, + "_score": 157.19217, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Set thresholds for an alert condition", - "sections": "Alert conditions", - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "title": "Alerts for synthetic monitoring", + "sections": "Mute (disable) monitor's alert notifications", + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "category_0": "Synthetic monitoring", + "category_1": "Synthetic monitoring", + "category_2": "Using monitors", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "body": " alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" }, - "id": "5f2d847c64441fc0a656a98a" + "id": "5f31b60e196a6742d2fbd6c8" }, { - "category_2": "New Relic One pricing and users", - "nodeid": 39496, + "category_2": "Measure DevOps success", + "nodeid": 16501, "sections": [ - "Accounts and billing", - "Account setup", - "Account structure", - "New Relic One pricing and users", - "General account settings", - "Automated user management", - "Partner install", - "Query and alert on usage data", - "Data types", - "Query examples", - "Data usage queries", - "User count queries", - "Set usage alerts", - "General attributes", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Incident orchestration: Align teams, tools, processes", + "Prerequisites", + "1. Assign first responders to team dashboards", + "2. Determine incident thresholds for alert conditions", + "3. Ensure alerts have auditable notification channels", + "4. Automate triage and resolution steps", "For more help" ], - "title": "Query and alert on usage data", - "category_0": "New Relic accounts", + "title": "Incident orchestration: Align teams, tools, processes", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "Accounts and billing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", + "category_1": "New Relic solutions", + "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", "image": "", - "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "published_at": "2020-10-03T15:47:18Z", - "updated_at": "2020-10-03T15:47:18Z", - "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", + "published_at": "2020-10-03T21:47:40Z", + "updated_at": "2020-09-28T00:43:51Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", + "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 81.71813, + "_score": 108.87247, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and alert on usage data", - "sections": "Query and alert on usage data", - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" + "sections": "3. Ensure alerts have auditable notification channels", + "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" }, - "id": "5f22f5bd64441f0c9e2a48ea" - } - ], - "/build-apps/build-hello-world-app": [ + "id": "5f5b2113e7b9d2249dacfd34" + }, { + "category_2": "Alert notifications", + "nodeid": 6491, "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Test alert notification channels", + "Request the test", + "Troubleshoot the test results", + "For more help" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "title": "Test alert notification channels", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-03T13:52:21Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", + "published_at": "2020-10-04T06:46:30Z", + "updated_at": "2020-08-11T04:16:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 196.23344, + "_score": 85.33279, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" + "title": "Test alert notification channels", + "sections": "Test alert notification channels", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "category_2": "Alert notifications", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5f2dbb3664441fd3a556a97c" }, { + "category_2": "Optimize your cloud native environment", + "nodeid": 32791, "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" - ], - "title": "Nerdpack file structure", - "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Set proactive alerts and align teams, tools, and processes for incident response", + "Prerequisites", + "1. Define policies", + "2. Set specific alerts", + "3. Identify groups", + "4. Determine thresholds", + "5. Set notification channels", + "6. Automate resolution", + "7. Establish reviews", + "8. Fine-tune process", + "Expert tip", + "For more help" ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-03T13:53:28Z", - "updated_at": "2020-08-14T01:49:25Z", + "title": "Set proactive alerts and align teams, tools, and processes for incident response ", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "6040cb4f86b1533eb31ac0e71e58709d77f79b50", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/proactive-baseline-alerts-devops_0.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/set-proactive-alerts-align-teams-tools-processes-incident-response", + "published_at": "2020-10-04T01:38:13Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "info": "Using New Relic's proactive alerting, you can spend less time firefighting and more time deploying significant changes to your product.", + "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.62155, + "_score": 82.55217, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "file structure", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "sections": "5. Set notification channels", + "body": " acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create" }, - "id": "5efa989e196a671300766404" + "id": "5f5ac17764441ff9d5e067ec" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Alert notifications", + "nodeid": 6481, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Update alert notification channels", + "Reference for updating channels", + "Basic process", + "For more help" ], - "published_at": "2020-10-03T13:52:21Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Update alert notification channels", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "ee8bce401d0623e8b85d84a6a20bd8a72b9764ef", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/update-alert-notification-channels", + "published_at": "2020-10-04T06:46:30Z", + "updated_at": "2020-08-11T06:42:27Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Read about how to update alerts notification channels. ", + "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 155.39194, + "_score": 82.34503, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" + "title": "Update alert notification channels", + "sections": "Update alert notification channels", + "info": "Read about how to update alerts notification channels. ", + "category_2": "Alert notifications", + "body": " to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add" }, - "id": "5f28bd6ae7b9d267996ade94" - }, + "id": "5f2dbad928ccbcb8ca88dfed" + } + ], + "/automate-workflows/get-started-kubernetes": [ { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "Map page views by region in a custom app", + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" - ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-03T13:47:57Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 137.73895, + "_score": 137.2037, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create and serve a new Nerdpack", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "sections": "Set up New Relic using the Kubernetes operator", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" }, - "id": "5efa993c196a67066b766469" + "id": "5efa999c196a67dfb4766445" }, { + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "document_type": "page", + "popularity": 1, + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 125.44798, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Create NRQL alert conditions", + "sections": "Create NRQL alert conditions", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + }, + "id": "5f2d992528ccbc489d88dfc1" + }, + { + "category_2": "Alerts release notes", + "nodeid": 40776, + "sections": [ + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "Component: NRQL Conditions (Review Required)", + "Announcing : New Relic One Streaming Alerts", + "Please read the full announcement and FAQ here , and follow the links to enroll." ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_0": "Release notes", + "type": "docs", + "category_1": "New Relic Platform release notes", + "external_id": "74ae41c7360962287ea605016bf7731035382166", "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-09-02T02:04:41Z", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", + "published_at": "2020-10-03T14:38:29Z", + "updated_at": "2020-09-29T22:06:08Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 104.565094, + "_score": 94.25044, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "nerdpack manager", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_2": "Alerts release notes", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" }, - "id": "5f45bf2864441ffb4dfdcdbb" - } - ], - "/build-apps/permission-manage-apps": [ + "id": "5f735c6964441f8a6aeb7297" + }, { - "category_2": "Original users and roles", - "nodeid": 1101, + "category_2": "Alert conditions", + "nodeid": 7261, "sections": [ - "Original accounts and billing", - "Original product-based pricing", - "Original users and roles", - "SAML SSO (original users)", - "Original data retention", - "Original pricing plan usage", - "Users and roles (original user model)", - "View and manage users", - "User types: basic user and full user", - "Account roles", - "Add-on roles", - "Account permissions", - "Alert permissions", - "APM permissions", - "Browser permissions", - "Infrastructure permissions", - "Insights permissions", - "Mobile permissions", - "Synthetics permissions", - "Workloads", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Set thresholds for an alert condition", + "What is a threshold?", + "View and set thresholds", "For more help" ], - "title": "Users and roles (original user model)", - "category_0": "New Relic accounts", + "title": "Set thresholds for an alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Original accounts and billing", - "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", "image": "", - "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", - "published_at": "2020-10-03T17:04:51Z", - "updated_at": "2020-10-03T17:04:51Z", - "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "published_at": "2020-10-03T18:47:38Z", + "updated_at": "2020-09-30T13:34:48Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 184.23627, + "_score": 87.917725, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Account permissions", - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" + "title": "Set thresholds for an alert condition", + "sections": "Alert conditions", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5f3e194028ccbc18c7f56de3" + "id": "5f2d847c64441fc0a656a98a" }, { - "category_2": "Get started", - "nodeid": 11261, + "category_2": "New Relic One pricing and users", + "nodeid": 39496, "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", + "Accounts and billing", + "Account setup", + "Account structure", + "New Relic One pricing and users", + "General account settings", + "Automated user management", + "Partner install", + "Query and alert on usage data", + "Data types", + "Query examples", + "Data usage queries", + "User count queries", + "Set usage alerts", + "General attributes", "For more help" ], - "title": "Integrations and managed policies", - "category_0": "Integrations", + "title": "Query and alert on usage data", + "category_0": "New Relic accounts", "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "category_1": "Accounts and billing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "published_at": "2020-10-03T15:47:18Z", + "updated_at": "2020-10-03T15:47:18Z", + "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", "document_type": "page", "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 125.095314, + "_score": 73.2136, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Integrations and managed policies", - "sections": "Option 2: Manually add permissions", - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" + "title": "Query and alert on usage data", + "sections": "Query and alert on usage data", + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" }, - "id": "5d6c1f4828ccbce6928f6fe0" - }, + "id": "5f22f5bd64441f0c9e2a48ea" + } + ], + "/build-apps/add-nerdgraphquery-guide": [ { "image": "", "url": "https://developer.newrelic.com/build-apps/", @@ -4971,349 +4635,480 @@ "Create a \"Hello, World!\" application", "Permissions for managing applications", "Set up your development environment", + "Add the NerdGraphQuery component to an application", "Add, query, and mutate data using NerdStorage", "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", "Add a table to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-03T13:45:46Z", + "published_at": "2020-10-04T02:16:58Z", "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "updated_at": "2020-10-04T02:16:57Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.96977, + "_score": 770.3739, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "Build apps", - "sections": "Permissions for managing applications", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + "sections": "Add the NerdGraphQuery component to an application", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" }, "id": "5efa999d64441fc0f75f7e21" }, { - "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", - "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "About this Learncast", - "Prerequisites", - "Virtual Training Session List" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "published_at": "2020-10-03T13:40:04Z", - "title": "Live Learncast: New Relic One Programmability", - "updated_at": "2020-07-31T01:40:49Z", - "type": "", - "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-04T02:14:58Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", "popularity": 1, - "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", - "info": "", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.47085, + "_score": 374.0268, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" + "title": "Map page views by region in a custom app", + "sections": "Query your browser data", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" }, - "id": "5dc618cbe7b9d2a0a8e4649c" + "id": "5efa993c196a67066b766469" }, { + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" ], - "title": "Serve, publish, and deploy your New Relic One app", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "document_type": "page", + "popularity": 1, + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 304.8992, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Sum of query results (limited or intermittent data)", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" + }, + "id": "5f2d992528ccbc489d88dfc1" + }, + { + "category_2": "NRQL query tutorials", + "nodeid": 36916, + "sections": [ + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", + "For more help" + ], + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "document_type": "page", + "popularity": 1, + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 281.49603, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + }, + "id": "5f2b1349196a67379343fbcf" + }, + { + "sections": [ + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" + ], + "title": "Query and store data", "type": "developer", "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "nerdgraph query components", + "mutation components", + "static methods" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-03T13:47:59Z", - "updated_at": "2020-09-02T02:05:55Z", + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 79.04379, + "_score": 270.39496, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Add images and metadata to your apps", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" + "title": "Query and store data", + "sections": "Components overview", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5efa989e28ccbc2f15307deb" } ], - "/automate-workflows/kubernetes-helm-deployment": [ + "/build-apps/build-hello-world-app": [ { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using the Kubernetes operator", - "Set up New Relic using Terraform" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" + ], + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" ], - "published_at": "2020-10-03T13:46:53Z", - "title": "Automate workflows", - "updated_at": "2020-10-03T02:03:43Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 6298.5215, + "_score": 194.04584, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" }, - "id": "5efa999c196a67dfb4766445" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Enable log monitoring", - "nodeid": 34166, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Kubernetes plugin for log forwarding", - "Requirements", - "Enable Kubernetes for logs management", - "View log data", - "What's next?", - "For more help" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "title": "Kubernetes plugin for log forwarding", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", - "published_at": "2020-09-30T15:46:39Z", - "updated_at": "2020-09-27T16:17:57Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 123.78511, + "_score": 180.8055, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "file structure", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5f37c1d064441f0d21a0a5e1" + "id": "5efa989e196a671300766404" }, { - "category_2": "Private locations", - "nodeid": 23821, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Install containerized private minions (CPMs)", - "General private minion features", - "Kubernetes-specific features", - "System requirements and compatibility", - "Private location key", - "Sandboxing and Docker dependencies", - "Install and update CPM versions", - "Start the CPM", - "Stop or delete the CPM", - "Show help and examples", - "Show license information", - "Configure CPM", - "Networks", - "Security, sandboxing, and running as non-root", - "Docker image repository", - "Additional considerations for CPM connection", - "For more help" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Install containerized private minions (CPMs)", - "category_0": "Synthetic monitoring", - "type": "docs", - "category_1": "Synthetic monitoring", - "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", - "published_at": "2020-10-04T00:01:41Z", - "updated_at": "2020-08-13T23:22:19Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", + "published_at": "2020-10-04T02:15:08Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.53432, + "_score": 154.78098, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Using monitors", - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" }, - "id": "5f31d981196a678103fbd731" + "id": "5f28bd6ae7b9d267996ade94" }, { - "category_2": "Enable and configure", - "nodeid": 38171, "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-09-30T14:39:10Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-04T02:14:58Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 106.641785, + "_score": 133.85135, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 2. (Infinite Tracing) Set up a trace observer", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + "sections": "Create and serve a new Nerdpack", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5ea0617064441ff137912311" + "id": "5efa993c196a67066b766469" }, { - "category_2": "Cloud adoption", - "nodeid": 16176, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Optimize your cloud spend", - "1. Deploy the New Relic Infrastructure agent", - "2. Create dashboard charts for cloud performance", - "3. Configure the Amazon AWS integration", - "4. Set up billing budgets in AWS", - "5. Add cloud spend and budget widgets to Insights dashboard", - "6. Create dashboards for every level of your organization", - "7. Set up alerts", - "For more help" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" + ], + "title": "Permissions for managing applications", + "type": "developer", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" ], - "title": "Optimize your cloud spend", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", - "published_at": "2020-10-03T21:33:08Z", - "updated_at": "2020-09-27T22:50:50Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-04T02:16:58Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.85382, + "_score": 104.41735, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "nerdpack manager", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5f59fc5b196a672f27ce6a45" + "id": "5f45bf2864441ffb4dfdcdbb" } ], "/explore-docs/query-and-store-data": [ @@ -5337,7 +5132,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-03T13:51:17Z", + "published_at": "2020-10-04T02:13:34Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -5345,7 +5140,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.87254, + "_score": 138.29794, "_version": null, "_explanation": null, "sort": null, @@ -5388,7 +5183,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 47.11972, + "_score": 46.897446, "_version": null, "_explanation": null, "sort": null, @@ -5442,7 +5237,7 @@ "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 33.186462, + "_score": 32.570927, "_version": null, "_explanation": null, "sort": null, @@ -5493,7 +5288,7 @@ "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 26.454775, + "_score": 26.262323, "_version": null, "_explanation": null, "sort": null, @@ -5518,28 +5313,266 @@ "Unity release notes", "For more help" ], - "title": "Introduction to New Relic Mobile (Unity)", + "title": "Introduction to New Relic Mobile (Unity)", + "type": "docs", + "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", + "image": "", + "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", + "published_at": "2020-10-04T04:12:22Z", + "updated_at": "2020-07-25T00:44:01Z", + "breadcrumb": "Contents", + "document_type": "page", + "popularity": 1, + "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 17.295717, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" + }, + "id": "5c52cbec8e9c0f0b286080ec" + } + ], + "/automate-workflows/kubernetes-helm-deployment": [ + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-04T02:09:04Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 6385.6387, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "category_2": "Enable log monitoring", + "nodeid": 34166, + "sections": [ + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Kubernetes plugin for log forwarding", + "Requirements", + "Enable Kubernetes for logs management", + "View log data", + "What's next?", + "For more help" + ], + "title": "Kubernetes plugin for log forwarding", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", + "published_at": "2020-10-04T02:40:10Z", + "updated_at": "2020-09-27T16:17:57Z", + "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "document_type": "page", + "popularity": 1, + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 120.70553, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "New Relic Logs", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + }, + "id": "5f37c1d064441f0d21a0a5e1" + }, + { + "category_2": "Private locations", + "nodeid": 23821, + "sections": [ + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Install containerized private minions (CPMs)", + "General private minion features", + "Kubernetes-specific features", + "System requirements and compatibility", + "Private location key", + "Sandboxing and Docker dependencies", + "Install and update CPM versions", + "Start the CPM", + "Stop or delete the CPM", + "Show help and examples", + "Show license information", + "Configure CPM", + "Networks", + "Security, sandboxing, and running as non-root", + "Docker image repository", + "Additional considerations for CPM connection", + "For more help" + ], + "title": "Install containerized private minions (CPMs)", + "category_0": "Synthetic monitoring", + "type": "docs", + "category_1": "Synthetic monitoring", + "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", + "published_at": "2020-10-04T00:01:41Z", + "updated_at": "2020-08-13T23:22:19Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", + "document_type": "page", + "popularity": 1, + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 116.44296, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Using monitors", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + }, + "id": "5f31d981196a678103fbd731" + }, + { + "category_2": "Enable and configure", + "nodeid": 38171, + "sections": [ + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Integrations: Enable distributed tracing", + "Step 1. Install the integration", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. (Infinite Tracing) Configure the integration", + "Step 4. View traces", + "For more help" + ], + "title": "Integrations: Enable distributed tracing", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", + "published_at": "2020-10-04T05:20:44Z", + "updated_at": "2020-09-30T14:39:10Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "document_type": "page", + "popularity": 1, + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 102.76022, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Step 2. (Infinite Tracing) Set up a trace observer", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + }, + "id": "5ea0617064441ff137912311" + }, + { + "category_2": "Cloud adoption", + "nodeid": 16176, + "sections": [ + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Optimize your cloud spend", + "1. Deploy the New Relic Infrastructure agent", + "2. Create dashboard charts for cloud performance", + "3. Configure the Amazon AWS integration", + "4. Set up billing budgets in AWS", + "5. Add cloud spend and budget widgets to Insights dashboard", + "6. Create dashboards for every level of your organization", + "7. Set up alerts", + "For more help" + ], + "title": "Optimize your cloud spend", + "category_0": "New Relic solutions", "type": "docs", - "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", - "image": "", - "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", - "published_at": "2020-09-30T14:13:59Z", - "updated_at": "2020-07-25T00:44:01Z", - "breadcrumb": "Contents", + "category_1": "New Relic solutions", + "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", + "published_at": "2020-10-03T21:33:08Z", + "updated_at": "2020-09-27T22:50:50Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 17.564232, + "_score": 100.69559, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" + "sections": "New Relic solutions", + "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" }, - "id": "5c52cbec8e9c0f0b286080ec" + "id": "5f59fc5b196a672f27ce6a45" } ], "/explore-docs/nerdpack-file-structure": [ @@ -5566,7 +5599,7 @@ "external_id": "aa427030169067481fb69a3560798265b6b52b7c", "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-03T13:46:53Z", + "published_at": "2020-10-04T02:06:15Z", "updated_at": "2020-08-21T01:45:19Z", "document_type": "page", "popularity": 1, @@ -5574,7 +5607,7 @@ "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 419.8947, + "_score": 415.38242, "_version": null, "_explanation": null, "sort": null, @@ -5608,7 +5641,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -5616,7 +5649,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 333.48828, + "_score": 331.5609, "_version": null, "_explanation": null, "sort": null, @@ -5645,270 +5678,50 @@ "Get your data into that table", "Make your app interactive with a text field", "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" - ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-03T13:47:57Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 300.77844, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Import additional modules from New Relic One", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" - }, - "id": "5efa993c196a67066b766469" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", - "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" - ], - "published_at": "2020-10-03T13:52:21Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", - "document_type": "page", - "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 284.87396, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" - }, - "id": "5f28bd6ae7b9d267996ade94" - }, - { - "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-03T13:46:53Z", - "updated_at": "2020-08-26T01:47:20Z", - "document_type": "page", - "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 275.07535, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "New Relic One CLI", - "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" - }, - "id": "5efa9973e7b9d242237bab39" - } - ], - "/explore-docs/nr1-config": [ - { - "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 242.03209, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" - }, - "id": "5efa989e28ccbc535a307dd0" - }, - { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", - "For more help" - ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", - "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.46175, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" - }, - "id": "5e9af5ba28ccbc3d4fd94a21" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "New Relic CLI Reference", + "title": "Map page views by region in a custom app", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-08-14T01:47:12Z", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-04T02:14:58Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 154.66888, + "_score": 293.8244, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "sections": "Import additional modules from New Relic One", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5efa993c196a67066b766469" }, { "image": "", @@ -5934,7 +5747,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-03T13:52:21Z", + "published_at": "2020-10-04T02:15:08Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5945,15 +5758,15 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.91361, + "_score": 282.50595, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" }, "id": "5f28bd6ae7b9d267996ade94" }, @@ -5977,7 +5790,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-03T13:46:53Z", + "published_at": "2020-10-04T02:07:32Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -5985,241 +5798,488 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.207825, + "_score": 278.78787, "_version": null, "_explanation": null, "sort": null, "highlight": { "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" }, "id": "5efa9973e7b9d242237bab39" } ], - "/explore-docs/nr1-subscription": [ + "/explore-docs/intro-to-sdk": [ + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add the NerdGraphQuery component to an application", + "Add, query, and mutate data using NerdStorage", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-04T02:16:58Z", + "title": "Build apps", + "updated_at": "2020-10-04T02:16:57Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 880.22675, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + }, + "id": "5efa999d64441fc0f75f7e21" + }, + { + "sections": [ + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" + ], + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-09-08T01:50:19Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 669.2426, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + }, + "id": "5efa989ee7b9d2048e7bab92" + }, + { + "category_2": "Getting started", + "nodeid": 7646, + "sections": [ + "New Relic APM", + "Getting started", + "Guides", + "Apdex", + "Maintenance", + "Troubleshooting", + "Introduction to APM", + "Why it matters", + "Monitor all aspects of your business", + "Ready to get started?", + "What's next?", + "For more help" + ], + "title": "Introduction to APM", + "category_0": "APM", + "type": "docs", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", + "image": "", + "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", + "published_at": "2020-10-03T14:46:24Z", + "updated_at": "2020-10-03T14:46:24Z", + "breadcrumb": "Contents / APM / New Relic APM / Getting started", + "document_type": "page", + "popularity": 1, + "info": "New Relic APM: an overview of its features and functionality.", + "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 594.89185, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "New Relic APM", + "info": "New Relic APM: an overview of its features and functionality.", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", + "breadcrumb": "Contents / APM / New Relic APM / Getting started" + }, + "id": "5f2dcb8a64441f3a1756a9e5" + }, + { + "category_2": "Optimize your cloud native environment", + "nodeid": 32786, + "sections": [ + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Migrate to microservices", + "1. Deploy instrumentation on all application tiers and components", + "2. Use key metrics to identify components that you can migrate to microservices", + "3. Use deployment markers to establish app performance baselines", + "4. Implement the new microservice-based architecture, and measure the success of your application development processes", + "5. Create a dashboard to monitor KPIs", + "6. Create a new baseline to use for comparisons", + "For more help" + ], + "title": "Migrate to microservices ", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", + "published_at": "2020-10-04T01:38:12Z", + "updated_at": "2020-09-27T20:33:59Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "document_type": "page", + "popularity": 1, + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 581.10565, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "1. Deploy instrumentation on all application tiers and components", + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" + }, + "id": "5f58347e64441f8c45e0684c" + }, + { + "sections": [ + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" + ], + "title": "Add tables to your New Relic One application", + "type": "developer", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-04T02:14:28Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", + "popularity": 1, + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 578.30237, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation." + }, + "id": "5efa989ee7b9d2ad567bab51" + } + ], + "/collect-data/query-data-nrql": [ { + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", + "New Relic Alerts", "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 244.74121, + "_score": 166.13931, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "title": "Create NRQL alert conditions", + "sections": "NRQL alert syntax", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f2d992528ccbc489d88dfc1" }, { - "nodeid": 37686, + "category_2": "Get started", + "nodeid": 11431, "sections": [ - "AWS Lambda monitoring", + "NRQL: New Relic Query Language", "Get started", - "Enable Lambda monitoring", - "UI and data", - "Troubleshooting", - "Update serverless monitoring for AWS Lambda", - "Update our Lambda integration via CLI", - "Update Layers via CLI", - "Update a manual Serverless Application Repository install", - "Enabling log management", + "NRQL query tools", + "NRQL query tutorials", + "Introduction to NRQL, New Relic's query language", + "What is NRQL?", + "Where can you use NRQL?", + "What data can you query with NRQL?", + "Start using NRQL", + "NRQL query examples", + "NRQL syntax", "For more help" ], - "title": "Update serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", + "title": "Introduction to NRQL, New Relic's query language", + "category_0": "Query your data", "type": "docs", - "category_1": "AWS Lambda monitoring", - "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", - "image": "", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", - "published_at": "2020-10-03T16:24:33Z", - "updated_at": "2020-09-24T13:54:59Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "published_at": "2020-10-03T15:18:02Z", + "updated_at": "2020-09-24T08:40:20Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", "document_type": "page", "popularity": 1, - "info": "How to update our Serverless monitoring for AWS Lambda. ", - "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.17293, + "_score": 118.560295, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Update our Lambda integration via CLI", - "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" + "title": "Introduction to NRQL, New Relic's query language", + "sections": "What data can you query with NRQL?", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" }, - "id": "5f6ca534196a67b08750423e" + "id": "5f2abd47196a67747343fbe1" }, { + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 129.05934, + "_score": 117.69586, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "Data requirements and limits for custom event data", + "sections": "Event data sources", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Ingest APIs", + "nodeid": 35526, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Metric API limits and restricted attributes", + "Endpoint requirements and maximum limits", + "Rate limit violations", + "Restricted attributes", + "For more help" ], - "published_at": "2020-10-03T13:52:21Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Metric API limits and restricted attributes", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", + "published_at": "2020-10-03T22:32:05Z", + "updated_at": "2020-10-03T22:32:04Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", + "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.73436, + "_score": 100.55293, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" - }, - "id": "5f28bd6ae7b9d267996ade94" - }, - { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", + "sections": "Ingest and manage data", + "category_0": "Telemetry Data Platform", + "category_1": "Ingest and manage data", + "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + }, + "id": "5f24e4ede7b9d28743c8231c" + }, + { + "category_2": "NRQL query tutorials", + "nodeid": 36916, + "sections": [ + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", "For more help" ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.78702, + "_score": 90.39712, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5e9af5ba28ccbc3d4fd94a21" + "id": "5f2b1349196a67379343fbcf" } ], - "/explore-docs/nr1-plugins": [ + "/explore-docs/nr1-subscription": [ { "sections": [ "New Relic One CLI reference", @@ -6242,7 +6302,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:14:29Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6250,7 +6310,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 240.98141, + "_score": 247.05179, "_version": null, "_explanation": null, "sort": null, @@ -6263,6 +6323,98 @@ }, "id": "5efa989e28ccbc535a307dd0" }, + { + "nodeid": 27692, + "sections": [ + "AWS Lambda monitoring", + "Get started", + "Enable Lambda monitoring", + "UI and data", + "Troubleshooting", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "What's next?", + "Optional: Stream all logs to New Relic", + "For more help" + ], + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", + "type": "docs", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "document_type": "page", + "popularity": 1, + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 171.65553, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Step 1. Install the newrelic-lambda-cli tool", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" + }, + "id": "5f6c67a464441f3a75eb72d3" + }, + { + "nodeid": 37686, + "sections": [ + "AWS Lambda monitoring", + "Get started", + "Enable Lambda monitoring", + "UI and data", + "Troubleshooting", + "Update serverless monitoring for AWS Lambda", + "Update our Lambda integration via CLI", + "Update Layers via CLI", + "Update a manual Serverless Application Repository install", + "Enabling log management", + "For more help" + ], + "title": "Update serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", + "type": "docs", + "category_1": "AWS Lambda monitoring", + "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", + "image": "", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", + "published_at": "2020-10-03T16:24:33Z", + "updated_at": "2020-09-24T13:54:59Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "document_type": "page", + "popularity": 1, + "info": "How to update our Serverless monitoring for AWS Lambda. ", + "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 134.03366, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Update our Lambda integration via CLI", + "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" + }, + "id": "5f6ca534196a67b08750423e" + }, { "sections": [ "New Relic CLI Reference", @@ -6276,7 +6428,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-03T13:52:22Z", + "published_at": "2020-10-04T02:13:34Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -6284,7 +6436,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 132.14163, + "_score": 131.87823, "_version": null, "_explanation": null, "sort": null, @@ -6321,7 +6473,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-03T13:52:21Z", + "published_at": "2020-10-04T02:15:08Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6332,7 +6484,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.91361, + "_score": 120.90228, "_version": null, "_explanation": null, "sort": null, @@ -6343,343 +6495,227 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, "id": "5f28bd6ae7b9d267996ade94" - }, - { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", - "For more help" - ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", - "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.87947, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" - }, - "id": "5e9af5ba28ccbc3d4fd94a21" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", - "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" - ], - "published_at": "2020-10-03T13:52:22Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", - "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.44229, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" - }, - "id": "5f28bd6a64441f9817b11a38" } ], - "/explore-docs/intro-to-sdk": [ + "/build-apps/map-pageviews-by-region": [ { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", "Add a table to your app", + "Collect data - any source", + "Automate common tasks", "Create a custom map view", - "Publish and deploy apps" + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "published_at": "2020-10-04T01:55:57Z", + "title": "New Relic Developers", + "updated_at": "2020-10-04T01:48:35Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 858.72314, + "_score": 163.21913, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + "sections": "Create a custom map view", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5d6fe49a64441f8d6100a50f" }, { "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Intro to NerdStorage", + "title": "Set up your development environment", "type": "developer", "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-03T13:51:17Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-04T02:07:32Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 654.14984, + "_score": 112.939316, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5efa9973e7b9d242237bab39" }, { - "category_2": "Getting started", - "nodeid": 7646, + "nodeid": 27692, "sections": [ - "New Relic APM", - "Getting started", - "Guides", - "Apdex", - "Maintenance", + "AWS Lambda monitoring", + "Get started", + "Enable Lambda monitoring", + "UI and data", "Troubleshooting", - "Introduction to APM", - "Why it matters", - "Monitor all aspects of your business", - "Ready to get started?", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", "What's next?", + "Optional: Stream all logs to New Relic", "For more help" ], - "title": "Introduction to APM", - "category_0": "APM", + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", - "image": "", - "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", - "published_at": "2020-10-03T14:46:24Z", - "updated_at": "2020-10-03T14:46:24Z", - "breadcrumb": "Contents / APM / New Relic APM / Getting started", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "New Relic APM: an overview of its features and functionality.", - "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 640.3344, + "_score": 102.66096, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic APM", - "info": "New Relic APM: an overview of its features and functionality.", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", - "breadcrumb": "Contents / APM / New Relic APM / Getting started" + "body": " invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent("MyEvent", map[string]interface{}{ "zip": "zap", }) } fmt.Println("hello world!") } Build and zip your Lambda function" }, - "id": "5f2dcb8a64441f3a1756a9e5" + "id": "5f6c67a464441f3a75eb72d3" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32786, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Migrate to microservices", - "1. Deploy instrumentation on all application tiers and components", - "2. Use key metrics to identify components that you can migrate to microservices", - "3. Use deployment markers to establish app performance baselines", - "4. Implement the new microservice-based architecture, and measure the success of your application development processes", - "5. Create a dashboard to monitor KPIs", - "6. Create a new baseline to use for comparisons", - "For more help" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Migrate to microservices ", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", - "published_at": "2020-09-30T16:52:11Z", - "updated_at": "2020-09-27T20:33:59Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 585.691, + "_score": 92.35541, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "1. Deploy instrumentation on all application tiers and components", - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" + "sections": "Use NerdStorage in your apps", + "tags": "new relic one apps", + "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" }, - "id": "5f58347e64441f8c45e0684c" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Measure DevOps success", - "nodeid": 16416, + "category_2": "Additional standard features", + "nodeid": 1921, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Establish objectives and baselines: define team SLOs", - "Service level components", - "Resources", - "1. Build an inventory of services requiring SLOs", - "2. Research customer expectations for SLOs", - "3. Define SLOs", - "4. Determine what can be instrumented", - "5. Review the default metrics", - "6. Set up custom instrumentation", - "7. Create Insights dashboards to track SLIs", + "Browser monitoring", + "Getting started", + "Guides", + "Installation", + "Configuration", + "Browser agent and SPA API", + "Page load timing resources", + "Browser Pro features", + "Additional standard features", + "Performance quality", + "Troubleshooting", + "Browser Geography: Webpage performance by location", + "Contents", + "View performance data by region", + "Use page functions", + "View drill-down details", "For more help" ], - "title": "Establish objectives and baselines: define team SLOs", - "category_0": "New Relic solutions", + "title": "Browser Geography: Webpage performance by location", + "category_0": "Browser monitoring", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "c51fb6972a0e1d7cd72eaea21310026ec5ddb6a4", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/catalyst-establish-objectives-2.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/establish-objectives-baselines-define-team-slos", - "published_at": "2020-10-03T21:44:47Z", - "updated_at": "2020-09-28T00:26:46Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "category_1": "Browser monitoring", + "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", + "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", + "published_at": "2020-10-03T23:25:25Z", + "updated_at": "2020-08-15T09:25:45Z", + "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", "document_type": "page", "popularity": 1, - "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", - "body": "A DevOps transformation requires a cultural shift so that teams can build new skills and motivations for the type of cross-team work required in a true DevOps practice. The transformation can be difficult when the people involved do not see the benefits of change as a clear objective. Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared. They also provide clear boundaries on service expectations that help teams achieve greater velocity and freedom in experimenting with new approaches. This tutorial defines SLOs for successful service delivery objectives and utilize New Relic instrumentation to surface the current performance metrics relative to those objectives. Measurable SLOs and visibility into your current progress against those SLOs ensure that you will be able to properly assess future optimization efforts. Service level components An SLO is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI); for example: Average response time Response time percentile Application availability SLOs clarify a target value for SLIs; for example: Average response time should be less than 200 ms 95% of requests should be completed within 250 ms Availability of the service should be 99.99% Logically group SLOs together to provide an overall boolean indicator of whether or not the service is meeting expectations. For example, a helpful SLO for alerting purposes could be: 95% of requests completed within 250 ms AND availability is 99.99% Service level components Example values SLI (Indicator) HTTP status codes SLO (Objective) < 1% HTTP 500s over 30 days SLA (Agreement) For every additional .1% of HTTP 500s, 5% refund of total contract Resources Value stream mapping can be a useful exercise to work through before setting SLOs. Work with your teams to clarify key components of your service and the appropriate metrics. Use these inputs as starting points for this tutorial. In addition: Learn about SLOs, SLIs, and SLAs from the Google Cloud Platform blog. Learn how New Relic has applied SLOs and SLIs into its reliability practices form this SREcon18 Americas presentation (approximately 21 minutes). 1. Build an inventory of services requiring SLOs Start defining SLOs for your application by first taking an inventory of the services that your application provides to both your internal and external customers. Draft a list of services. Make the scope of services you consider as comprehensive as possible. Engage your team members and other stakeholders to validate the list for completeness. Segment your application stack to understand the potential components that might require SLOs. For example, most applications can be segmented as: Application (backend/microservices) Dependency services (such as the message queue) Database Website Underlying servers This example lists components that would benefit from SLOs: Customer type Component name Owner Language stack Operating system External Service 1 John D. Java RHEL 6 Internal Service 2 Jane A. .NET Win2003 R2 Internal ActiveMQ John D. Java AIX External Website Jane A. Classic ASP Win2000 Internal MS SQL Dave Z. n/a Win2003 R2 Building a definitive list of services that require an SLO can be challenging, because an application often consists of many endpoints with complex interdependencies. Begin your SLO journey with pragmatism. Start by defining a broader, simpler set of SLOs that are driven by what your customers care about most and what your team can control. As your teams better align around SLOs, you can then begin to fine-tune and add more complexity. 2. Research customer expectations for SLOs Once you have an inventory of services, begin to gather the information you need to define the SLOs for those services. Interviews with customers that depend on your services are often valuable for understanding service expectations. For example, to define SLOs for internal teams, New Relic, ask questions such as: If possible, can you broadly categorize the types of requests we can expect from you and your service? To what extent do you or your service depend on timely responses to requests? Are there requests for which response time is not critical? How does your service handle unavailable dependencies or data? What is the maximum amount of unavailable data that your service can handle? At what threshold does your service fail if a request takes too long? What are acceptable rates of errors? What would a SLA look like between our product and yours? Existing usage data can also be a helpful research input. 3. Define SLOs Using the research on customer expectations that you gathered, draft a focused set of SLOs. New Relic recommends setting SLOs against one or more of the following SLIs: Application availability percentage Average response time Response percentile Error rate Apdex value Also, consider instrumenting and tracking the following SLIs: Throughput (peak and trough) Database call count and duration DNS and SSL timing DOM processing and page rendering Mean-time-to-detection (MTTD) For a more comprehensive list of potential areas to measure, see Measuring DevOps. Recommendation: To determine if your application is performing to customer expectations: Consider combining multiple SLIs (for example, availability and response time) into one SLO. Aim to define a consistent set of conditions across all of the services in your list. Consult your team and stakeholders to validate that the SLOs you set are reasonable, consistently attainable (even if you are not currently meeting them), and aligned to customer expectations. After you finish this step, you should have a set of well-defined SLOs and SLIs. 4. Determine what can be instrumented Now you are ready to deploy agents or monitors to establish a performance baseline for the SLIs you created. With proper instrumentation in place, you will have visibility into the performance indicators that matter for your team and your customers. In addition, you will also have a clear understanding of how to meet your SLOs. Identify the service components your team will optimize. Verify which application tiers meet New Relic monitoring requirements. To ensure you have robust baselines from which to work, determine the level of instrumentation that is possible (or allowed) within your organization. There may be situations where instrumentation of the current on-premise environment is not viable. For example, firewalls with certain settings may not permit New Relic agents to transmit data. Recommendation: If the application has a web front end in these situations, use New Relic Synthetics. Synthetics offers non-agent monitoring while still providing the ability to establish a baseline. To instrument the example applications and components in this tutorial, use these New Relic products: New Relic products Customer type Component name Tier owner Language stack Server OS New Relic products External Service 1 John D. Java RHEL 6 APM, Infrastructure, Synthetics Internal Service 2 Jane A. .Net Win2003 R2 APM, Infrastructure Internal ActiveMQ John D. Java AIX APM, Plugins External Website Jane A. Classic ASP Win2000 Synthetics Internal MS SQL Dave Z. NA Win2003 R2 Infrastructure, On-host integration APM installation After reviewing the compatibility and requirements for New Relic APM, install the APM agent on your application stack. Steps for installing APM agents vary based on language agent type. Follow the installation procedures for specific APM agents. Infrastructure installation After reviewing the requirements for New Relic Infrastructure, follow the installation procedures to install the Infrastructure agent on instances that host your applications. The New Relic Infrastructure agent requires the following host permissions: Linux: To install and run the agent, you must have root privileges. Windows: To install and run the agent, you must have Administrator privileges. Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations based on their availability. New Relic supports several commonly used application components, including MySQL, Apache, NGINX, and more. For more information, see New Relic's on-host integrations documentation. Synthetics New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. Follow the procedures to create a simple browser check. Be sure to verify that your website URL is accessible from the Synthetics public network locations. Browser New Relic Browser provides deep insights into how your users are interacting with your application or website. Browser complements Synthetics with data based on actual user experiences, which is useful in discerning how DevOps efforts are ultimately improving the experience for the customer. For more information, see the compatibility and requirements, then install the New Relic Browser agent. Mobile The growing role of mobile apps in customer experience often spurs new performance data needs. Installation of New Relic Mobile lets DevOps teams instrument iOS and Android applications to gain a fuller understanding of service delivery quality. Plugins Developers can use the New Relic Plugins product to create plugins that monitor numerical metrics provided by external services, hosts, or equipment. You can install existing plugins from Plugin Central, or plan, develop, test, and create your own plugins. 5. Review the default metrics After you deploy the agents and monitors, use service maps to review the default metrics that New Relic captures. For example, a typical service map show many of the common SLIs that application teams rely on, including response time, Apdex, throughput, and error rate metrics from APM. It also shows page load time, Ajax response, throughput, and error rate from Browser. rpm.newrelic.com > Service maps: To explore detailed granularity for any area, use the service map's nodes. 6. Set up custom instrumentation To close any remaining gaps in visibility for your SLIs, use custom instrumentation. New Relic provides several avenues for adding custom instrumentation, including: Making API calls to agents from inside your source code Packaging XML-based custom instrumentation modules with deployed applications Adding UI-based instrumentation without a code deploy In addition, you can add custom attributes to each transaction event that match application performance factors to critical business information. Then you can track those attributes in Insights dashboards. For more information, see the custom instrumentation documentation for your application: APM Browser Infrastructure Insights Mobile Synthetics 7. Create Insights dashboards to track SLIs Once you implement the appropriate instrumentation, it is easy to visualize your service level indicators with New Relic Insights dashboards. Insights provides a single location to query and view all the data that New Relic products gather. For example, Insights helps visualize the following data gathered from New Relic products: Infrastructure: Use default Infrastructure events and attributes for your systems, processes, events, storage, and network; Infrastructure integrations; and custom attributes. APM: Use Transaction and TransactionError event types. Browser: Use PageView and PageAction event types. Mobile: Use several Mobile event types. Synthetics: Use SyntheticCheck, SyntheticRequest, and SyntheticPrivateMinion event types. Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your dashboards. Create dashboards that include widgets for the SLI baseline data. Use these widgets and dashboards to establish team dashboards that you can share and use to conduct operations reviews. insights.newrelic.com > (select a dashboard): Query your SLI baseline data, create dashboards with widgets to visualize the data, then share with your team and stakeholders.​ The metrics you capture will become your application's baseline. Share your Insights dashboard with your application team and stakeholders to provide visibility into what is happening with your application and to monitor future performance. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 576.2837, + "_score": 91.01366, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Establish objectives and baselines: define team SLOs", - "sections": "New Relic solutions", - "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": ". Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" + "sections": "View performance data by region", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" }, - "id": "5f5b215064441f4c48e06825" + "id": "561c8bbc827a6617ad000172" } ], - "/build-apps/set-up-dev-env": [ + "/explore-docs/nr1-plugins": [ { "sections": [ "New Relic One CLI reference", @@ -6687,728 +6723,689 @@ "Tip", "New Relic One CLI Commands", "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-03T13:52:22Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 233.57695, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" - }, - "id": "5efa989e28ccbc535a307dd0" - }, - { - "category_2": "Trace API", - "nodeid": 35381, - "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Report traces via the Trace API (New Relic format)", - "Example: Use your tool’s native sampling", - "Example: Use Infinite Tracing", - "JSON requirements and recommendations", - "Attributes", - "Required attributes", - "Highly recommended attributes", - "Reserved attributes", - "Other attributes", - "Explore more about distributed tracing:", - "For more help" + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Report traces via the Trace API (New Relic format)", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "ba16f3a71b78e24c23da821b64567398251bb217", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-new-relic-format-traces-trace-api", - "published_at": "2020-10-03T22:14:29Z", - "updated_at": "2020-09-30T17:57:42Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 126.97283, + "_score": 235.24146, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report traces via the Trace API (New Relic format)", - "sections": "Report traces via the Trace API (New Relic format)", - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "category_2": "Trace API", - "body": " an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H "Content", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, - "id": "5d89dc6028ccbc83ce9cb16f" + "id": "5efa989e28ccbc535a307dd0" }, { - "category_2": "Enable and configure", - "nodeid": 17021, + "nodeid": 27692, "sections": [ - "Distributed tracing", + "AWS Lambda monitoring", "Get started", - "Enable and configure", - "Other requirements", + "Enable Lambda monitoring", "UI and data", - "Trace API", "Troubleshooting", - "Language agents: Enable distributed tracing", - "Step 1. Prerequisites", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. Configure the agents", - "Step 4. View traces", - "Manual instrumentation (If automatic instrumentation doesn't work)", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "What's next?", + "Optional: Stream all logs to New Relic", "For more help" ], - "title": "Language agents: Enable distributed tracing", - "category_0": "Understand dependencies", + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "Distributed tracing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", - "external_id": "92f81f3ba78006bec29baec46891cf6cfb1c9468", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", - "published_at": "2020-10-03T21:57:11Z", - "updated_at": "2020-10-03T21:57:11Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "How to enable distributed tracing or Infinite Tracing for APM agents.", - "body": "Here's what you need to know for enabling either standard distributed tracing or Infinite Tracing with our language agents. If you want to get more background before getting started, check out these topics: How span sampling works explains distributed tracing options. Impacts to APM tells you what to expect if you are a current APM user. The process of enabling distributed tracing takes you through these steps: Meet the prerequisites (Infinite Tracing) Set up a trace observer Configure your agents View traces Step 1. Prerequisites Check the following sections to confirm that the distributed tracing options you want are available for your environment. Your main options are: Standard distributed tracing: Head-based sampling Infinite Tracing: Tail-based sampling Support for W3C Trace Context: Available in all Infinite Tracing agents and in standard distributed tracing agents as noted Once you find the agent version with the features you want, follow the links for help installing or updating your agent. For best results, update existing agents to the latest version. C SDK Install (compile) or update to the required C SDK version. For best results, update to the latest C SDK version. Option C SDK version Standard distributed tracing 1.1.0 or higher (W3C Trace Context not available) Infinite Tracing Not available Go Install or update to the required Go agent version. For best results, update to the latest Go agent version. Option Go agent version Standard distributed tracing 2.1.0 or higher With W3C Trace Context: 3.1.0 or higher Infinite Tracing v3.5.0 (includes W3C Trace Context) Supported environments: Go 1.9 or higher Java Install or update to the required Java agent version. For best results, update to the latest Java agent version. Type Java agent version Standard distributed tracing 4.3.0 or higher With W3C Trace Context: 5.10 or higher Infinite Tracing 5.12.1 or higher (includes W3C Trace Context) Supported environments: Java 8: Update 252 or higher All versions of Java 9 or higher For special considerations, see Infinite Tracing: Configuring SSL for Java 7 and 8. .NET Install or update to the required .NET agent version. For best results, update to the latest .NET agent version. Option .NET agent version Standard distributed tracing 8.6.45.0 or higher With W3C Trace Context: 8.27.139.0 or higher Infinite Tracing 8.30.0 (includes W3C Trace Context) Supported environments: .NET Framework 4.5 or higher .NET Core 2.0 or higher Node.js Install or update to the required Node.js agent version. For best results, update to the latest Node.js agent version. Option Node.js agent version Standard distributed tracing 4.7.0 or higher With W3C Trace Context: 6.4 or higher Infinite Tracing 6.7.0 (includes W3C Trace Context) Supported environments: Node version 10.10.0 or higher PHP Install or update to the required PHP agent version. For best results, update to the latest PHP agent version. Option PHP agent version Standard distributed tracing 8.4 or higher With W3C Trace Context: 9.8 or higher Infinite Tracing 9.12.0.268 or higher Python Install or update to the required Python agent version. For best results, update to the latest Python agent version. Option Python agent version Standard distributed tracing 4.2.0.100 or higher With W3C Trace Context: 5.6 or higher Infinite Tracing 5.12.0.140 (includes W3C Trace Context) Supported environments: CPython only (pypy is unsupported) Ruby Install or update to the required Ruby agent version. For best results, update to the latest Ruby agent version. Also install the additional Ruby agent gem for Infinite Tracing. Option Ruby agent version Standard distributed tracing newrelic_rpm 5.3.0.346 or higher With W3C Trace Context: newrelic_rpm 6.9 or higher Infinite Tracing newrelic_rpm 6.11.0.365 or higher (includes W3C Trace Context) newrelic-infinite_tracing 6.11.0.375 or higher Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Configure the agents. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Endpoints dropdown value Description For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. Configure the agents. For other integrations (Optional) Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in 2b. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. Configure the agents Distributed tracing is enabled through configuration settings. The settings you need to change for distributed tracing depend on the type you want: Standard distributed tracing Infinite Tracing (requires YOUR_TRACE_OBSERVER_HOST from step 2) Review the following section for your agent to see the required configuration settings. For more information, see Configure the agent. Server-side configuration is not available for Infinite Tracing. C SDK Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your C applications. Type Required configuration Standard distributed tracing Configuration examples: newrelic_app_config_t structure: newrelic_app_config_t* config; config = newrelic_create_app_config(app_name, license_key); config->distributed_tracing.enabled = true; Infinite Tracing Not available Go Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your Go applications. Type Required configuration Standard distributed tracing Configuration examples: ConfigOption structure: newrelic.NewApplication( newrelic.ConfigAppName(\"Example App\"), newrelic.ConfigLicense(os.Getenv(\"NEW_RELIC_LICENSE_KEY\")), newrelic.ConfigDistributedTracerEnabled(true), ) Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: newrelic.Config structure: app, err := newrelic.NewApplication( newrelic.ConfigAppName(YOUR_APP_NAME), newrelic.ConfigLicense(YOUR_LICENSE_KEY), func(cfg *newrelic.Config) { cfg.DistributedTracer.Enabled = true cfg.InfiniteTracing.TraceObserver.Host = YOUR_TRACE_OBSERVER_HOST }, ) Environment variables: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=YOUR_TRACE_OBSERVER_HOST Java Here's an overview of the settings. For more help with configuration, see Java agent configuration: Config file. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true Java system property: -Dnewrelic.config.distributed_tracing.enabled=true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: \"YOUR_TRACE_OBSERVER_HOST\" Java system property: -Dnewrelic.config.distributed_tracing.enabled=true -Dnewrelic.config.infinite_tracing.trace_observer.host=\"YOUR_TRACE_OBSERVER_HOST\" Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" .NET Here's an overview of the settings. For more help with configuration, see .NET agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Node.js Here's an overview of the settings. For more help with configuration, see Node.js agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } infinite_tracing: { trace_observer: { host: 'YOUR_TRACE_OBSERVER_HOST' } } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" PHP Here's an overview of the settings. For more help with configuration, see Distributed tracing for the PHP agent Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true Infinite Tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true newrelic.span_events_enabled = true newrelic.infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Python Here's an overview of the settings. For more help with configuration, see Python agent configuration Type Required configuration Standard distributed tracing Configuration file (newrelic.ini): distributed_tracing.enabled = true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Use the following installation command: pip install newrelic[infinite-tracing] Configuration file (newrelic.ini): distributed_tracing.enabled = true infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Ruby Here's an overview of the settings. For more help with configuration, see Ruby agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: 'YOUR_TRACE_OBSERVER_HOST' Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" If you need help with proxy configuration, see Proxy support. Step 4. View traces After you upgrade and configure your APM agents to send data to your trace observer, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID Manual instrumentation (If automatic instrumentation doesn't work) Recommendation: Before performing any custom instrumentation, read: How distributed tracing works Troubleshoot missing data If a service is not passing the trace header to other services, you can use the distributed tracing payload APIs to instrument the calling service and the called service. The calling service uses an API call to generate a payload, which is accepted by the called service. Instrument the calling service To instrument the calling service: Ensure the version of the APM agent that monitors the calling service supports distributed tracing. Invoke the agent API call for generating a distributed trace payload: C SDK | Go | Java | .NET | Node.js | PHP | Python | Ruby. To maintain proper ordering of spans in a trace, ensure you generate the payload in the context of the span that sends it. Add that payload to the call made to the destination service (for example, in a header). (Optional) Identify the call as an external call: C SDK Go Java .NET: n/a Node.js PHP: n/a Python Ruby Instrument the called service To instrument the called service: Ensure the version of the APM agent that monitors the called service supports distributed tracing. If the New Relic agent on the called service does not identify a New Relic transaction, use the agent API to declare a transaction: C SDK One way to tell that a transaction is not in progress: when newrelic_create_distributed_trace_payload() is called, a NULL pointer is returned. To solve this problem, follow the procedures to create a transaction with the C SDK. Go One way to tell that a transaction is not in progress: when Transaction.InsertDistributedTraceHeaders(h http.Header) is called, no headers are inserted. To create a transaction, see Instrument Go transactions. Java One way to tell that a transaction is not in progress: when createDistributedTracePayload() is called, an empty string is returned. To create a transaction, see Java agent transaction-related APIs. .NET One way to tell that a transaction is not in progress: CreateDistributedTracePayload() returns an empty payload. To create a transaction, see Introduction to .NET custom instrumentation. Node.js One way to tell that a transaction is not in progress: the Node.js agent logs will report an error similar to this: No transaction found when calling Transaction.acceptDistributedTracePayload. Use startWebTransaction to create a web transaction or startBackgroundTransaction to capture a non-web transaction. PHP One way to tell that a transaction is not in progress: newrelic_insert_distributed_trace_headers() returns false. To create a transaction, see newrelic_start_transaction. Python To tell that a transaction is not in progress: when transaction = current_transaction() is run, transaction is None. Or, if result = accept_distributed_trace_payload(payload) is run, then the result is False. Use background_task to report a non-web transaction. For more on Python instrumentation, see Monitor transactions and segments. Ruby If you are using a Rack-based web framework and have enabled New Relic's Rack instrumentation, the Ruby agent will handle starting a transaction for you. For other use cases, see the add_transaction_tracer API method. Extract the payload from the call that you received (for example, in a header). Invoke the call for accepting the payload: C SDK | Go | Java | .NET | PHP | Node.js | Python | Ruby. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 126.90546, + "_score": 146.14874, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Trace API", - "body": " the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see" + "sections": "Step 1. Install the newrelic-lambda-cli tool", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" }, - "id": "5eb2c480e7b9d2bc7afa4921" + "id": "5f6c67a464441f3a75eb72d3" }, { - "category_2": "Enable and configure", - "nodeid": 38171, "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-09-30T14:39:10Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.757996, + "_score": 131.93639, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Trace API", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5ea0617064441ff137912311" + "id": "5efa989ee7b9d2024b7bab97" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Add tables to your New Relic One application", + "published_at": "2020-10-04T02:15:08Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" - ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-03T13:47:59Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.587746, + "_score": 120.958954, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, - "id": "5efa989ee7b9d2ad567bab51" - } - ], - "/collect-data/query-data-nrql": [ + "id": "5f28bd6ae7b9d267996ade94" + }, { - "category_2": "Alert conditions", - "nodeid": 9231, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-09-30T20:06:36Z", - "updated_at": "2020-09-30T20:06:35Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "published_at": "2020-10-04T02:14:29Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", + "type": "developer", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. To learn more about gap filling and how to request access to it, see this announcement. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.0247, + "_score": 106.61279, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "NRQL alert syntax", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" - }, - "id": "5f2d992528ccbc489d88dfc1" - }, - { - "category_2": "Custom events", - "nodeid": 13661, - "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + }, + "id": "5f28bd6a64441f9817b11a38" + } + ], + "/build-apps/set-up-dev-env": [ + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 125.284424, + "_score": 235.1152, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Event data sources", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa989e28ccbc535a307dd0" }, { - "category_2": "Get started", - "nodeid": 11431, + "nodeid": 27692, "sections": [ - "NRQL: New Relic Query Language", + "AWS Lambda monitoring", "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Introduction to NRQL, New Relic's query language", - "What is NRQL?", - "Where can you use NRQL?", - "What data can you query with NRQL?", - "Start using NRQL", - "NRQL query examples", - "NRQL syntax", + "Enable Lambda monitoring", + "UI and data", + "Troubleshooting", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "What's next?", + "Optional: Stream all logs to New Relic", "For more help" ], - "title": "Introduction to NRQL, New Relic's query language", - "category_0": "Query your data", + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "published_at": "2020-10-03T15:18:02Z", - "updated_at": "2020-09-24T08:40:20Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 124.89453, + "_score": 156.20346, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Introduction to NRQL, New Relic's query language", - "sections": "What data can you query with NRQL?", - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + "sections": "Step 1. Install the newrelic-lambda-cli tool", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic" }, - "id": "5f2abd47196a67747343fbe1" + "id": "5f6c67a464441f3a75eb72d3" }, { - "category_2": "Ingest APIs", - "nodeid": 35526, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Metric API limits and restricted attributes", - "Endpoint requirements and maximum limits", - "Rate limit violations", - "Restricted attributes", - "For more help" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "title": "Metric API limits and restricted attributes", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", - "published_at": "2020-10-03T22:32:05Z", - "updated_at": "2020-10-03T22:32:04Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "title": "Add tables to your New Relic One application", + "type": "developer", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-04T02:14:28Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", - "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 112.646484, + "_score": 118.82881, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Ingest and manage data", - "category_0": "Telemetry Data Platform", - "category_1": "Ingest and manage data", - "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" }, - "id": "5f24e4ede7b9d28743c8231c" + "id": "5efa989ee7b9d2ad567bab51" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "category_2": "Trace API", + "nodeid": 35381, "sections": [ - "NRQL: New Relic Query Language", + "Distributed tracing", "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Report traces via the Trace API (New Relic format)", + "Example: Use your tool’s native sampling", + "Example: Use Infinite Tracing", + "JSON requirements and recommendations", "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", + "Required attributes", + "Highly recommended attributes", + "Reserved attributes", + "Other attributes", + "Explore more about distributed tracing:", "For more help" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", + "title": "Report traces via the Trace API (New Relic format)", + "category_0": "Understand dependencies", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-10-03T23:04:50Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "category_1": "Distributed tracing", + "external_id": "ba16f3a71b78e24c23da821b64567398251bb217", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-new-relic-format-traces-trace-api", + "published_at": "2020-10-03T22:14:29Z", + "updated_at": "2020-09-30T17:57:42Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", + "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 98.131744, + "_score": 118.33429, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "title": "Report traces via the Trace API (New Relic format)", + "sections": "Report traces via the Trace API (New Relic format)", + "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", + "category_2": "Trace API", + "body": " an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H "Content", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API" }, - "id": "5f2b1349196a67379343fbcf" - } - ], - "/build-apps/add-nerdgraphquery-guide": [ + "id": "5d89dc6028ccbc83ce9cb16f" + }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add the NerdGraphQuery component to an application", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "published_at": "2020-10-03T13:45:46Z", - "title": "Build apps", - "updated_at": "2020-10-03T02:03:44Z", + "title": "Nerdpack file structure", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-04T02:12:13Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 764.49646, + "_score": 116.526726, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account" + "tags": "New Relic One CLI", + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, - "id": "5efa999d64441fc0f75f7e21" - }, + "id": "5efa989e196a671300766404" + } + ], + "/explore-docs/nr1-config": [ { "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Map page views by region in a custom app", + "title": "New Relic One CLI reference", "type": "developer", "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "New Relic One app", + "nerdpack commands" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-03T13:47:57Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-04T02:14:29Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 379.8938, + "_score": 237.05124, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Query your browser data", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, - "id": "5efa993c196a67066b766469" + "id": "5efa989e28ccbc535a307dd0" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "category_2": "Troubleshooting", + "nodeid": 13726, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", "For more help" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-10-03T23:04:50Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 301.15198, + "_score": 164.00407, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5e9af5ba28ccbc3d4fd94a21" }, { - "category_2": "Get started", - "nodeid": 17216, "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "How New Relic distributed tracing works", - "How trace sampling works", - "Head-based sampling (standard distributed tracing)", - "Tail-based sampling (Infinite Tracing)", - "How trace data is structured", - "How trace data is stored", - "How trace context is passed between applications", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "How New Relic distributed tracing works", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works", - "external_id": "c4eac888d4d46698466b40c3e7e6583c162cd52b", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-distributed-tracing-trace-structure.png", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works", - "published_at": "2020-10-03T23:12:33Z", - "updated_at": "2020-10-03T23:12:33Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Get started", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-04T02:13:34Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "A technical explanation of how New Relic's distributed tracing feature works. ", - "body": "Here are some technical details about how New Relic distributed tracing works: How trace sampling works How trace data is structured How trace data is stored How trace context is passed between applications For instructions about setting up distributed tracing, see Overview: Enable distributed tracing. How trace sampling works We offer the following types of sampling: Head-based sampling (standard distributed tracing) Tail-based sampling (Infinite Tracing) Head-based sampling (standard distributed tracing) Distributed tracing requires the reporting and processing of a large amount of data. For this reason, we have limits on data reporting, and we use sampling to capture a representative sample of activity. Ideally, the sampled data represents the characteristics of your larger data set and provides the detail you need for troubleshooting. Standard distributed tracing applies filters to individual spans before all spans in a trace arrive. This is called head-based sampling, which means decisions about whether to accept spans is made at the head (beginning) of the filtering process. Here are some details about the head-based sampling in standard distributed tracing: Adaptive sampling process (APM agents) APM agents use adaptive sampling to capture a representative sample of system activity. The following is an explanation of how adaptive sampling works. (AWS Lambda monitoring uses a different sampling process.) For the first service in a distributed trace, 10 requests are chosen to be sampled. The throughput to that service is used to adjust how frequently requests are sampled. This is explained in more detail below. The first service we monitor in a distributed trace is called the trace origin. The trace origin chooses requests at random to be traced. That decision propagates to the downstream services touched by that request. When the request has completed, all of the spans created by the services touched by that request are available in the UI as a complete end-to-end trace. APM agents have a limit on the number of transactions collected per minute (this can vary, depending on agent) and a limit on the number of spans collected per minute (1000 per agent instance). To adhere to these limits, the default number of traces at the trace origin is 10 traces per minute. An APM agent spreads out the collection of these 10 traces over a minute in order to get a representative sample over time. The exact sampling rate depends on the number of transactions in the previous minute. The rate responds to changes in transaction throughput, going up or down. For example, if the previous minute had 100 transactions, the agent would anticipate a similar number of transactions and select 1 out of every 10 transactions to be traced. Span limits and sampling (APM agents) An APM agent instance using head-based sampling has a limit of 1000 spans per minute. The agent attempts to keep all spans that are marked to be sampled as part of a distributed trace. In many distributed systems, the average microservice may generate 10 to 20 spans per request. In those cases, the agent span limit can accommodate all spans chosen, and that service will have full detail in a trace. However, some requests to services will generate many spans, and the agent span limit will be reached. As a result, some traces will not have full detail for that service. One solution to this would be to custom instrument an agent to report less activity and therefore report fewer spans. Browser span reporting Browser monitoring reports all spans, but APM samples a percentage of spans. This means that there will likely be many more browser spans than back-end spans, which can result in browser app spans disconnected from back-end spans. For tips on querying for traces that contain front and back-end spans, see Find browser span data. Trace rate limiting If the above sampling methods still result in too much trace data, we may limit incoming data by sampling traces after they're received. By making this decision at the trace level, it avoids fragmenting traces (accepting only part of a trace). This process works similarly to adaptive sampling. The total spans received in a minute are totaled. If too many spans are received, fewer spans may be accepted in the following minute, in order to achieve a floating-average throughput rate. Tail-based sampling (Infinite Tracing) Tail-based sampling is available in Infinite Tracing, an additional option available for distributed tracing. Infinite Tracing uses tail-based sampling to accept and analyze 100% of your span data. Tail-based sampling means that filtering decisions are done at the tail end of processing after all the spans in a trace have arrived. Only traces that contain the most actionable data, such as errors or unusual latency, are forwarded for you to view in the UI. Architecture For Infinite Tracing, agents or integrations send 100% of all instrumented spans to a trace observer. The trace observer is a distributed tracing service residing in a cluster of services on AWS called New Relic Edge. Only your spans go to the trace observer—all other data such as metrics, custom events, and transaction traces are sent the normal route to New Relic and are subject to local sampling. You configure a unique trace observer endpoint for the AWS region you want to send data to. You can request multiple endpoints, one per AWS region. The endpoint represents a trace observer for a particular workload. For example, all spans from a single trace (request) must go to that endpoint. Here are two architectural diagrams: one showing how data flows if you use APM agents and another if you use New Relic integrations like OpenTelemetry exporters: The trace observer holds traces open while spans for that trace arrive. Once the first span in a trace arrives, a session is kept open for 10 seconds. Each time a new span for that trace arrives, the expiration time is reset to 10 seconds. Traces that haven't seen a span arrive within the last 10 seconds will automatically expire. Tail-based sampling algorithms By default, each trace observer offers traces to three samplers: one looking for duration outliers, one looking for traces with errors, and one trying to randomly sample across all trace types. Each sampler keeps a target percentage of traces that match their criteria. Here are details about each sampler: Sampler Matching criteria Target percent Duration Traces with an outlier duration, using two algorithms: Gaussian (Assumes a normal distribution and a threshold at the 99th percentile) Eccentricity (Assumes no distribution and a threshold based on cluster) 100% Error Traces having at least one span with an error 100% Random All traces 1% If the matching criteria matches the trace, each sampler looks at the trace’s shape. A trace’s shape is the unique combination of the root span’s entity name and span name. This is a simple way to separate traces using the entry point of the request. Once the shape is determined, the sampler makes a decision to keep or reject the trace based on its target sampling percent. If it’s 100%, the trace is automatically kept. If it’s anything less, the probability the sampler keeps a given trace is determined by the target percent. For example, the target percent is 1 for random traces, so 1% of those traces are kept. Because the trace observer uses percentages of throughput, the number of traces selected will vary with that throughput. How trace data is structured Understanding the structure of a distributed trace can help you: Understand how traces are displayed in our UI Help you query trace data A distributed trace has a tree-like structure, with \"child\" spans that refer to one \"parent\" span. This diagram shows some important span relationships in a trace: This diagram shows how spans in a distributed trace relate to each other. This diagram shows several important concepts: Trace root. The first service or process in a trace is referred to as the root service or process. Process boundaries. A process represents the execution of a logical piece of code. Examples of a process include a backend service or Lambda function. Spans within a process are categorized as one of the following: Entry span: the first span in a process. Exit span: a span is a considered an exit span if it a) is the parent of an entry span, or b) has http. or db. attributes and therefore represents an external call. In-process span: a span that represents an internal method call or function and that is not an exit or entry span. Client spans. A client span represents a call to another entity or external dependency. Currently, there are two client span types: Datastore. If a client span has any attributes prefixed with db. (like db.statement), it's categorized as a datastore span. External. If a client span has any attributes prefixed with http. (like http.url) or has a child span in another process, it's categorized as an external span. This is a general category for any external calls that are not datastore queries. Trace duration. A trace's total duration is determined by the length of time from the start of the earliest span to the completion of the last span. You can query span relationship data with the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. How trace data is stored Understanding how we store trace data can help you query your trace data. We save trace data as: Span: A span represents operations that are part of a distributed trace. The operations that a span can represent include browser-side interactions, datastore queries, calls to other services, method-level timing, and Lambda functions. One example: in an HTTP service, a span is created at the start of an HTTP request and completed when the HTTP server returns a response. Span attributes contain important information about that operation (such as duration, host data, etc.), including trace-relationship details (such as traceId, guid). For span-related data, see span attributes. Transaction: If an entity in a trace is monitored by an agent, a request to that entity generates a single Transaction event. Transactions allow trace data to be tied to other New Relic features. For transaction-related data, see transaction attributes. Contextual metadata. We store metadata that shows calculations about a trace and the relationships between its spans. To query this data, use the NerdGraph GraphiQL explorer. How trace context is passed between applications We support the W3C Trace Context standard, which makes it easier to trace transactions across networks and services. When you enable distributed tracing, New Relic agents add HTTP headers to a service's outbound requests. HTTP headers act like passports on an international trip: They identify your software traces and carry important information as they travel through various networks, processes, and security systems. The headers also contain information that helps us link the spans together later: metadata like the trace ID, span ID, the New Relic account ID, and sampling information. This header information is passed along each span of a trace, unless the progress is stopped by something like middleware or agents that don't recognize the header format (see Figure 1). Figure 1 To address the problem of header propagation, we support the W3C Trace Context specification that requires two standardized headers. Our latest W3C New Relic agents send and receive these two required headers, and by default, they also send and receive the header of the prior New Relic agent: W3C (traceparent): The primary header that identifies the entire trace (trace ID) and the calling service (span id). W3C (tracestate): A required header that carries vendor-specific information and tracks where a trace has been. New Relic (newrelic): The original, proprietary header that is still sent to maintain backward compatibility with prior New Relic agents. This combination of three headers allows traces to be propagated across services instrumented with these types of agents: W3C New Relic agents Non-W3C New Relic agents W3C Trace Context-compatible agents If your requests only touch W3C Trace Context-compatible agents, you can opt to turn off the New Relic header. See the agent configuration documentation for details about turning off the newrelic header. The scenarios below show various types of successful header propagation. Scenario 1: Trace touching three agent types This shows the flow of headers when a request touches three different agent types: Scenario 2: Trace with W3C New Relic and middleware This shows the combination of headers sent by a W3C New Relic agent to some middleware. Scenario 3: Trace with any W3C-compliant agent and a New Relic agent. This shows the two required W3C headers from another vendor accepted by a W3C New Relic agent. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 291.98853, + "_score": 153.81834, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "UI and data", - "body": " to other New Relic features. For transaction-related data, see transaction attributes. Contextual metadata. We store metadata that shows calculations about a trace and the relationships between its spans. To query this data, use the NerdGraph GraphiQL explorer. How trace context is passed between" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5d4bcef728ccbcc1b2df8700" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Enable and configure", - "nodeid": 17021, + "nodeid": 27692, "sections": [ - "Distributed tracing", + "AWS Lambda monitoring", "Get started", - "Enable and configure", - "Other requirements", + "Enable Lambda monitoring", "UI and data", - "Trace API", "Troubleshooting", - "Language agents: Enable distributed tracing", - "Step 1. Prerequisites", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. Configure the agents", - "Step 4. View traces", - "Manual instrumentation (If automatic instrumentation doesn't work)", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "What's next?", + "Optional: Stream all logs to New Relic", "For more help" ], - "title": "Language agents: Enable distributed tracing", - "category_0": "Understand dependencies", + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "Distributed tracing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", - "external_id": "92f81f3ba78006bec29baec46891cf6cfb1c9468", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "document_type": "page", + "popularity": 1, + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 121.62736, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" + }, + "id": "5f6c67a464441f3a75eb72d3" + }, + { "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/language-agents-enable-distributed-tracing", - "published_at": "2020-10-03T21:57:11Z", - "updated_at": "2020-10-03T21:57:11Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "sections": [ + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" + ], + "published_at": "2020-10-04T02:15:08Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "How to enable distributed tracing or Infinite Tracing for APM agents.", - "body": "Here's what you need to know for enabling either standard distributed tracing or Infinite Tracing with our language agents. If you want to get more background before getting started, check out these topics: How span sampling works explains distributed tracing options. Impacts to APM tells you what to expect if you are a current APM user. The process of enabling distributed tracing takes you through these steps: Meet the prerequisites (Infinite Tracing) Set up a trace observer Configure your agents View traces Step 1. Prerequisites Check the following sections to confirm that the distributed tracing options you want are available for your environment. Your main options are: Standard distributed tracing: Head-based sampling Infinite Tracing: Tail-based sampling Support for W3C Trace Context: Available in all Infinite Tracing agents and in standard distributed tracing agents as noted Once you find the agent version with the features you want, follow the links for help installing or updating your agent. For best results, update existing agents to the latest version. C SDK Install (compile) or update to the required C SDK version. For best results, update to the latest C SDK version. Option C SDK version Standard distributed tracing 1.1.0 or higher (W3C Trace Context not available) Infinite Tracing Not available Go Install or update to the required Go agent version. For best results, update to the latest Go agent version. Option Go agent version Standard distributed tracing 2.1.0 or higher With W3C Trace Context: 3.1.0 or higher Infinite Tracing v3.5.0 (includes W3C Trace Context) Supported environments: Go 1.9 or higher Java Install or update to the required Java agent version. For best results, update to the latest Java agent version. Type Java agent version Standard distributed tracing 4.3.0 or higher With W3C Trace Context: 5.10 or higher Infinite Tracing 5.12.1 or higher (includes W3C Trace Context) Supported environments: Java 8: Update 252 or higher All versions of Java 9 or higher For special considerations, see Infinite Tracing: Configuring SSL for Java 7 and 8. .NET Install or update to the required .NET agent version. For best results, update to the latest .NET agent version. Option .NET agent version Standard distributed tracing 8.6.45.0 or higher With W3C Trace Context: 8.27.139.0 or higher Infinite Tracing 8.30.0 (includes W3C Trace Context) Supported environments: .NET Framework 4.5 or higher .NET Core 2.0 or higher Node.js Install or update to the required Node.js agent version. For best results, update to the latest Node.js agent version. Option Node.js agent version Standard distributed tracing 4.7.0 or higher With W3C Trace Context: 6.4 or higher Infinite Tracing 6.7.0 (includes W3C Trace Context) Supported environments: Node version 10.10.0 or higher PHP Install or update to the required PHP agent version. For best results, update to the latest PHP agent version. Option PHP agent version Standard distributed tracing 8.4 or higher With W3C Trace Context: 9.8 or higher Infinite Tracing 9.12.0.268 or higher Python Install or update to the required Python agent version. For best results, update to the latest Python agent version. Option Python agent version Standard distributed tracing 4.2.0.100 or higher With W3C Trace Context: 5.6 or higher Infinite Tracing 5.12.0.140 (includes W3C Trace Context) Supported environments: CPython only (pypy is unsupported) Ruby Install or update to the required Ruby agent version. For best results, update to the latest Ruby agent version. Also install the additional Ruby agent gem for Infinite Tracing. Option Ruby agent version Standard distributed tracing newrelic_rpm 5.3.0.346 or higher With W3C Trace Context: newrelic_rpm 6.9 or higher Infinite Tracing newrelic_rpm 6.11.0.365 or higher (includes W3C Trace Context) newrelic-infinite_tracing 6.11.0.375 or higher Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Configure the agents. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Endpoints dropdown value Description For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. Configure the agents. For other integrations (Optional) Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in 2b. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. Configure the agents Distributed tracing is enabled through configuration settings. The settings you need to change for distributed tracing depend on the type you want: Standard distributed tracing Infinite Tracing (requires YOUR_TRACE_OBSERVER_HOST from step 2) Review the following section for your agent to see the required configuration settings. For more information, see Configure the agent. Server-side configuration is not available for Infinite Tracing. C SDK Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your C applications. Type Required configuration Standard distributed tracing Configuration examples: newrelic_app_config_t structure: newrelic_app_config_t* config; config = newrelic_create_app_config(app_name, license_key); config->distributed_tracing.enabled = true; Infinite Tracing Not available Go Here's an overview of the settings. For more help with configuration, see Enable distributed tracing for your Go applications. Type Required configuration Standard distributed tracing Configuration examples: ConfigOption structure: newrelic.NewApplication( newrelic.ConfigAppName(\"Example App\"), newrelic.ConfigLicense(os.Getenv(\"NEW_RELIC_LICENSE_KEY\")), newrelic.ConfigDistributedTracerEnabled(true), ) Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: newrelic.Config structure: app, err := newrelic.NewApplication( newrelic.ConfigAppName(YOUR_APP_NAME), newrelic.ConfigLicense(YOUR_LICENSE_KEY), func(cfg *newrelic.Config) { cfg.DistributedTracer.Enabled = true cfg.InfiniteTracing.TraceObserver.Host = YOUR_TRACE_OBSERVER_HOST }, ) Environment variables: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=YOUR_TRACE_OBSERVER_HOST Java Here's an overview of the settings. For more help with configuration, see Java agent configuration: Config file. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true Java system property: -Dnewrelic.config.distributed_tracing.enabled=true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml) (indented 2 spaces under the common stanza): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: \"YOUR_TRACE_OBSERVER_HOST\" Java system property: -Dnewrelic.config.distributed_tracing.enabled=true -Dnewrelic.config.infinite_tracing.trace_observer.host=\"YOUR_TRACE_OBSERVER_HOST\" Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" .NET Here's an overview of the settings. For more help with configuration, see .NET agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.config): Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Node.js Here's an overview of the settings. For more help with configuration, see Node.js agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.js): distributed_tracing: { enabled: true } infinite_tracing: { trace_observer: { host: 'YOUR_TRACE_OBSERVER_HOST' } } Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" PHP Here's an overview of the settings. For more help with configuration, see Distributed tracing for the PHP agent Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true Infinite Tracing Configuration examples: Configuration file (newrelic.ini): newrelic.distributed_tracing_enabled = true newrelic.span_events_enabled = true newrelic.infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Python Here's an overview of the settings. For more help with configuration, see Python agent configuration Type Required configuration Standard distributed tracing Configuration file (newrelic.ini): distributed_tracing.enabled = true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Use the following installation command: pip install newrelic[infinite-tracing] Configuration file (newrelic.ini): distributed_tracing.enabled = true infinite_tracing.trace_observer_host= YOUR_TRACE_OBSERVER_HOST Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" Ruby Here's an overview of the settings. For more help with configuration, see Ruby agent configuration. Type Required configuration Standard distributed tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Infinite Tracing Configuration examples: Configuration file (newrelic.yml): distributed_tracing: enabled: true infinite_tracing: trace_observer: host: 'YOUR_TRACE_OBSERVER_HOST' Environment variable: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST=\"YOUR_TRACE_OBSERVER_HOST\" If you need help with proxy configuration, see Proxy support. Step 4. View traces After you upgrade and configure your APM agents to send data to your trace observer, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID Manual instrumentation (If automatic instrumentation doesn't work) Recommendation: Before performing any custom instrumentation, read: How distributed tracing works Troubleshoot missing data If a service is not passing the trace header to other services, you can use the distributed tracing payload APIs to instrument the calling service and the called service. The calling service uses an API call to generate a payload, which is accepted by the called service. Instrument the calling service To instrument the calling service: Ensure the version of the APM agent that monitors the calling service supports distributed tracing. Invoke the agent API call for generating a distributed trace payload: C SDK | Go | Java | .NET | Node.js | PHP | Python | Ruby. To maintain proper ordering of spans in a trace, ensure you generate the payload in the context of the span that sends it. Add that payload to the call made to the destination service (for example, in a header). (Optional) Identify the call as an external call: C SDK Go Java .NET: n/a Node.js PHP: n/a Python Ruby Instrument the called service To instrument the called service: Ensure the version of the APM agent that monitors the called service supports distributed tracing. If the New Relic agent on the called service does not identify a New Relic transaction, use the agent API to declare a transaction: C SDK One way to tell that a transaction is not in progress: when newrelic_create_distributed_trace_payload() is called, a NULL pointer is returned. To solve this problem, follow the procedures to create a transaction with the C SDK. Go One way to tell that a transaction is not in progress: when Transaction.InsertDistributedTraceHeaders(h http.Header) is called, no headers are inserted. To create a transaction, see Instrument Go transactions. Java One way to tell that a transaction is not in progress: when createDistributedTracePayload() is called, an empty string is returned. To create a transaction, see Java agent transaction-related APIs. .NET One way to tell that a transaction is not in progress: CreateDistributedTracePayload() returns an empty payload. To create a transaction, see Introduction to .NET custom instrumentation. Node.js One way to tell that a transaction is not in progress: the Node.js agent logs will report an error similar to this: No transaction found when calling Transaction.acceptDistributedTracePayload. Use startWebTransaction to create a web transaction or startBackgroundTransaction to capture a non-web transaction. PHP One way to tell that a transaction is not in progress: newrelic_insert_distributed_trace_headers() returns false. To create a transaction, see newrelic_start_transaction. Python To tell that a transaction is not in progress: when transaction = current_transaction() is run, transaction is None. Or, if result = accept_distributed_trace_payload(payload) is run, then the result is False. Use background_task to report a non-web transaction. For more on Python instrumentation, see Monitor transactions and segments. Ruby If you are using a Rack-based web framework and have enabled New Relic's Rack instrumentation, the Ruby agent will handle starting a transaction for you. For other use cases, see the add_transaction_tracer API method. Extract the payload from the call that you received (for example, in a header). Invoke the call for accepting the payload: C SDK | Go | Java | .NET | PHP | Node.js | Python | Ruby. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 286.77063, + "_score": 120.958954, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "UI and data", - "body": " the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, - "id": "5eb2c480e7b9d2bc7afa4921" + "id": "5f28bd6ae7b9d267996ade94" } ] } \ No newline at end of file From 0650acc6021a110b3dc4fad5f8debc1a7e887a84 Mon Sep 17 00:00:00 2001 From: nr-opensource-bot Date: Tue, 6 Oct 2020 01:03:28 +0000 Subject: [PATCH 4/7] chore(related-content): updated related content data --- src/data/related-pages.json | 8409 +++++++++++++++++------------------ 1 file changed, 4170 insertions(+), 4239 deletions(-) diff --git a/src/data/related-pages.json b/src/data/related-pages.json index 95cbd5621..1aabce305 100644 --- a/src/data/related-pages.json +++ b/src/data/related-pages.json @@ -19,18 +19,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-04T01:55:57Z", + "published_at": "2020-10-05T01:45:14Z", "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.70761, + "_score": 179.219, "_version": null, "_explanation": null, "sort": null, @@ -54,7 +54,7 @@ "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-04T02:09:04Z", + "published_at": "2020-10-05T01:53:44Z", "title": "Automate workflows", "updated_at": "2020-10-04T02:09:04Z", "type": "developer", @@ -65,7 +65,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 160.4002, + "_score": 147.7428, "_version": null, "_explanation": null, "sort": null, @@ -106,7 +106,7 @@ "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.96498, + "_score": 105.43245, "_version": null, "_explanation": null, "sort": null, @@ -142,7 +142,7 @@ "external_id": "531f2f3985bf64bb0dc92a642445887095048882", "image": "", "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:53:45Z", "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, @@ -150,7 +150,7 @@ "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.56128, + "_score": 99.45044, "_version": null, "_explanation": null, "sort": null, @@ -200,7 +200,7 @@ "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 83.04667, + "_score": 78.68115, "_version": null, "_explanation": null, "sort": null, @@ -215,127 +215,218 @@ "id": "5f4c3992e7b9d2c2d203eddd" } ], - "/collect-data/custom-attributes": [ + "/build-apps/howto-use-nrone-table-components": [ { "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "url": "https://developer.newrelic.com/components/table-header-cell/", "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Collect data - any source", - "Create custom events", - "Build queries with NerdGraph", - "Query data with NRQL" + "TableHeaderCell", + "Usage", + "Props" ], - "published_at": "2020-10-04T02:07:32Z", - "title": "Collect data", - "updated_at": "2020-10-04T02:07:32Z", + "published_at": "2020-10-05T02:06:36Z", + "title": "TableHeaderCell", + "updated_at": "2020-08-03T04:46:36Z", "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", + "document_type": "page", + "popularity": 1, + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 511.11728, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "TableHeaderCell", + "sections": "TableHeaderCell", + "info": "A TableHeaderCell component!", + "body": "TableHeaderCell Usage Copy Props There are no props for this component." + }, + "id": "5efa9906196a67523e76646e" + }, + { + "image": "", + "url": "https://developer.newrelic.com/components/table-row/", + "sections": [ + "TableRow", + "Usage", + "Props" + ], + "published_at": "2020-10-05T02:06:38Z", + "title": "TableRow", + "updated_at": "2020-08-03T04:45:42Z", + "type": "developer", + "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", + "document_type": "page", + "popularity": 1, + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 423.41083, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "TableRow", + "sections": "TableRow", + "info": "A TableRow component!", + "body": "TableRow Usage Copy Props There are no props for this component." + }, + "id": "5efa98d564441f93435f7e24" + }, + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.63216, + "_score": 417.17697, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa997328ccbc768c307de2" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Measure DevOps success", - "nodeid": 16556, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: track experience indicators", - "Prerequisites", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Utilize data to separate performance by cohort and debug issues at the customer level", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Customer experience improvement: track experience indicators", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-10-03T21:48:58Z", - "updated_at": "2020-09-27T21:45:56Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-05T01:53:44Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.27499, + "_score": 284.56732, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" + "title": "Map page views by region in a custom app", + "sections": "Import the TableChart component", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" }, - "id": "5f5adb2728ccbc7152532752" + "id": "5efa993c196a67066b766469" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32796, + "category_2": "Cloud adoption", + "nodeid": 16121, "sections": [ "New Relic solutions", "Measure DevOps success", "Cloud adoption", "Optimize your cloud native environment", - "Customer experience improvement: Track experience indicators", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Use data to separate performance by cohort and debug issues at the customer level", + "Create application baselines", + "1. Identify components", + "2. Determine compatibility", + "3. Deploy monitoring", + "4. Gather metrics", + "5. Set up Dashboards", + "Expert tips", "For more help" ], - "title": "Customer experience improvement: Track experience indicators", + "title": "Create application baselines", "category_0": "New Relic solutions", "type": "docs", "category_1": "New Relic solutions", - "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-10-04T01:39:59Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", + "image": "", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", + "published_at": "2020-10-03T21:26:31Z", + "updated_at": "2020-09-27T20:07:57Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", "document_type": "page", "popularity": 1, - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 96.10097, + "_score": 281.6892, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: Track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" + "title": "Create application baselines", + "sections": "1. Identify components", + "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" }, - "id": "5f5ac17528ccbce4f0532733" - }, + "id": "5ad48685c75d0766faa181bd" + } + ], + "/explore-docs/newrelic-cli": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -355,771 +446,801 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-04T01:55:57Z", + "published_at": "2020-10-05T01:45:14Z", "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 95.533104, + "_score": 813.82495, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Browser agent release notes", - "nodeid": 40791, + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Browser agent release notes", - "Browser Agent v1184", - "Release Dates", - "New Features", - "Added support for custom attributes on PageViewTiming events", - "Issue Resolutions", - "How to upgrade your agent" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "Browser Agent v1184", - "category_0": "Release notes", - "type": "docs", - "category_1": "Browser agent release notes", - "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", - "published_at": "2020-10-03T14:39:21Z", - "updated_at": "2020-10-02T05:37:45Z", - "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", + "published_at": "2020-10-05T01:53:44Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.8313, + "_score": 756.5852, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Added support for custom attributes on PageViewTiming events", - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" }, - "id": "5f76bca928ccbcaa75337d9b" - } - ], - "/build-apps/add-query-mutate-data-nerdstorage": [ + "id": "5efa999c196a67dfb4766445" + }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Measure DevOps success", + "nodeid": 34966, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Automate instrumentation", + "Prerequisite", + "1. Make instrumentation part of every build", + "2. Take advantage of integrations and existing tools", + "3. Leverage the power of APIs", + "For more help" ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Automate instrumentation", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", + "published_at": "2020-10-03T22:22:40Z", + "updated_at": "2020-09-28T01:04:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 419.0056, + "_score": 682.1383, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add, query, and mutate data using NerdStorage", - "body": " your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your" + "sections": "New Relic solutions", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f5e0c14196a67e25fce6a8a" }, { "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Intro to NerdStorage", + "title": "New Relic One CLI reference", "type": "developer", "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "New Relic One app", + "nerdpack commands" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.39203, + "_score": 564.5376, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to NerdStorage", - "sections": "Intro to NerdStorage", - "info": "Intro to NerdStorage on New Relic One", - "tags": "nerdstorage", - "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5efa989e28ccbc535a307dd0" }, { + "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", + "url": "https://developer.newrelic.com/nerd-days/", "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Nerd Days is a free 1-day event focused on building more perfect software", + "Register for Nerd Days 1.0", + "What’s is Nerd Days exactly…", + "Save the date & join us online", + "Additional Nerd Days Events", + "REGISTER FOR NERD DAYS | AMERICAS", + "Speaker line up", + "Aaron Soto", + "Caitlin Halla", + "David Shanker", + "Jeremy Cooper", + "Joel Worrall", + "John Vajda", + "Jon Thurman", + "Justin Eveland", + "Leon Chapman", + "Lindsy Farina", + "Talia Nassi", + "Thomas Martin", + "Alec Swanson", + "Brian Thomason", + "Chris Trombley", + "Gabe O'Brien", + "Liam Hurrell", + "Michael Caron", + "Phil Weber", + "Sebastian Remirez", + "Tracks", + "Observability", + "Cloud migration", + "Open source", + "Devops journey", + "Fundamentals", + "Nerd Days AMER Agenda", + "DevOps journey", + "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", + "Instrumenting your service using agents", + "New Relic CLI Wizardry", + "5 Steps to Kubernetes Observability", + "Delivering SRE as a Service", + "Building applications on New Relic One", + "Exploring your data using NRQL", + "New Relic AI", + "Going Serverless: Chipping at the monolith", + "Logging for Modern Organizations", + "Grafana and Prometheus with New Relic", + "Lunch with Lew", + "Custom Instrumentation", + "Exploring Data with NerdGraph", + "Tool Consolidation", + "Testing in Production", + "How Open Source powers the New Relic One Catalog", + "Alerts Best Practices", + "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", + "Monitoring your Cloud Usage and Spend", + "Measuring code pipelines", + "Reducing toil with Terraform", + "True availability using Synthetics", + "How Observability-Driven Development accelerates DevOps transformations", + "AWS Modernization", + "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", + "NerdStorageVault: ThirdParty Secrets", + "Closing + Swag", + "Engage with the developer community" ], - "title": "New Relic CLI Reference", + "published_at": "2020-10-05T02:06:36Z", + "title": "New Relic Developers", + "updated_at": "2020-10-03T02:00:34Z", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.49411, + "_score": 516.36414, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "New Relic Developers", + "sections": "New Relic CLI Wizardry", + "body": " of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes" }, - "id": "5efa989ee7b9d2024b7bab97" - }, + "id": "5f3dd5bf28ccbc2349f56e4e" + } + ], + "/collect-data/custom-events": [ { + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" - ], - "title": "Query and store data", - "type": "developer", - "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-08-01T01:42:02Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 80.73134, + "_score": 93.166664, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and store data", - "sections": "Query and store data", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" + "title": "Data requirements and limits for custom event data", + "sections": "Custom events", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989e28ccbc2f15307deb" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "category_2": "Logs in context with agent APIs", + "nodeid": 36921, "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Collect data - any source", - "Create custom events", - "Build queries with NerdGraph", - "Query data with NRQL" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Annotate logs for logs in context using APM agent APIs", + "APM agent trace metadata and linking metadata APIs", + "Resources for correctly annotating logs", + "For more help" ], - "published_at": "2020-10-04T02:07:32Z", - "title": "Collect data", - "updated_at": "2020-10-04T02:07:32Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "title": "Annotate logs for logs in context using APM agent APIs", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", + "published_at": "2020-10-03T23:04:51Z", + "updated_at": "2020-09-27T21:36:25Z", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 75.09915, + "_score": 82.11586, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Collect data", - "sections": "Query data with NRQL", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "Annotate logs for logs in context using APM agent APIs", + "sections": "Logs in context with agent APIs", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "category_2": "Logs in context with agent APIs", + "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" }, - "id": "5efa997328ccbc768c307de2" - } - ], - "/terms": [ + "id": "5f37535c196a67c8c055e5ff" + }, { - "category_2": "Product definitions", - "nodeid": 39646, + "category_2": "Custom events", + "nodeid": 6256, "sections": [ - "License information", - "General usage licenses", - "Special services licenses", - "Distributed licenses", - "Referenced policies", - "Product definitions", - "Usage plans", - "FAQ", - "New Relic One pricing: Definitions", + "Event data sources", + "Default events", + "Custom events", + "APM: Report custom events", + "Data considerations", + "Record a custom event", + "Timestamps", + "Limits and restricted characters", + "Reserved words", "For more help" ], - "title": "New Relic One pricing: Definitions", - "category_0": "Licenses", + "title": "APM: Report custom events", + "category_0": "Insights", "type": "docs", - "category_1": "License information", - "external_id": "097fc095ef18942f3af1845237742340e36416b8", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-09-10T14:58:10Z", - "breadcrumb": "Contents / Licenses / License information / Product definitions", + "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "published_at": "2020-10-03T15:13:27Z", + "updated_at": "2020-09-24T07:10:11Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic APM: how to report custom events and attributes.", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 344.14017, + "_score": 68.22344, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" + "title": "APM: Report custom events", + "sections": "Custom events", + "info": "New Relic APM: how to report custom events and attributes.", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f23b039196a67030b94f5c4" + "id": "5f480a5a64441f578bfdcdb1" }, { - "image": "", - "url": "https://opensource.newrelic.com/cla/", "sections": [ - "NEW RELIC, INC.", - "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", - "Definitions." + "Collect data from any source", + "Agent APIs", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API", + "Log API" ], - "published_at": "2020-10-04T02:29:09Z", - "title": "New Relic Open Source Contributor License Agreement", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", + "title": "Collect data from any source", + "type": "developer", + "tags": [ + "Agent API", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API" + ], + "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", + "image": "", + "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", + "published_at": "2020-10-05T01:53:45Z", + "updated_at": "2020-08-14T01:45:09Z", "document_type": "page", "popularity": 1, - "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 337.66238, + "_score": 56.08195, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" + "sections": "Agent APIs", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "tags": "Agent API", + "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" }, - "id": "5f31822264441fcbe056a984" + "id": "5efa997128ccbc3c9a307dfd" }, { - "category_2": "Developer Edition", - "nodeid": 39641, + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Developer Program Resources", + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", "For more help" ], - "title": "Developer Program Resources", - "category_0": "Licenses", + "title": "Report custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Product or service licenses", - "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-08-08T19:17:02Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "New Relic Developer edition policy", - "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 335.85278, + "_score": 55.273838, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" + "title": "Report custom event data", + "sections": "Custom events", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f338507e7b9d2f670c9de83" - }, + "id": "5e8e7f9de7b9d2aa122cf0f6" + } + ], + "/collect-data/collect-data-from-any-source": [ { - "category_2": "New Relic One", - "nodeid": 39366, + "category_2": "Ingest APIs", + "nodeid": 35471, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Preview access for New Relic One", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Telemetry SDKs: Report custom telemetry data", + "Requirements and compatibility", + "Available libraries", + "Write your own Telemetry SDK or contribute to an existing one", + "Integrations built with the Telemetry SDKs", "For more help" ], - "title": "Preview access for New Relic One", - "category_0": "Licenses", + "title": "Telemetry SDKs: Report custom telemetry data", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "Product or service licenses", - "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", - "published_at": "2020-10-04T06:02:04Z", - "updated_at": "2020-07-31T04:41:27Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", - "document_type": "page", - "popularity": 1, - "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 327.8681, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" - }, - "id": "5f23a0f7e7b9d29da9c82305" - }, - { - "category_2": "Data privacy", - "nodeid": 1591, - "sections": [ - "Security and Privacy", - "Data privacy", - "Compliance", - "Information security", - "Security bulletins", - "Security controls for privacy", - "Secured content", - "Analytics", - "Data transmission and firewalls", - "Hosting and data storage", - "Data access", - "HTTP parameters disabled by default", - "For more help" - ], - "title": "Security controls for privacy", - "category_0": "New Relic Security and Privacy", - "type": "docs", - "category_1": "Security and Privacy", - "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "category_1": "Ingest and manage data", + "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", "image": "", - "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", - "published_at": "2020-10-04T07:08:53Z", - "updated_at": "2020-09-24T07:44:02Z", - "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", + "published_at": "2020-10-03T22:04:50Z", + "updated_at": "2020-09-17T14:37:52Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 323.04443, + "_score": 155.1181, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Security and Privacy", - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "category_0": "New Relic Security and Privacy", - "category_1": "Security and Privacy", - "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" + "title": "Telemetry SDKs: Report custom telemetry data", + "sections": "Telemetry SDKs: Report custom telemetry data", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "category_0": "Telemetry Data Platform", + "category_2": "Ingest APIs", + "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5e30b8a864441f47ebd05cb0" - } - ], - "/collect-data/custom-events": [ + "id": "5d89fefbe7b9d2537ed30dc1" + }, { "category_2": "Custom events", - "nodeid": 13661, + "nodeid": 13806, "sections": [ "Event data sources", "Default events", "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", "For more help" ], - "title": "Data requirements and limits for custom event data", + "title": "Report custom event data", "category_0": "Insights", "type": "docs", "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.883804, + "_score": 95.037735, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "title": "Report custom event data", + "sections": "Event data sources", + "info": "An overview of the options for sending custom event data to New Relic. ", "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "category_2": "Custom events", + "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "category_2": "Logs in context with agent APIs", - "nodeid": 36921, + "category_2": "Get started", + "nodeid": 36051, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Annotate logs for logs in context using APM agent APIs", - "APM agent trace metadata and linking metadata APIs", - "Resources for correctly annotating logs", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Get data into New Relic", + "New Relic-built agents and integrations", + "Agent APIs", + "Telemetry SDKs", + "APIs for sending metrics, traces, logs, and events", + "New Relic One applications", "For more help" ], - "title": "Annotate logs for logs in context using APM agent APIs", - "category_0": "Log management", + "title": "Get data into New Relic", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "Enable log management", - "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", + "category_1": "Ingest and manage data", + "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", - "published_at": "2020-10-03T23:04:51Z", - "updated_at": "2020-09-27T21:36:25Z", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", + "published_at": "2020-10-04T03:02:05Z", + "updated_at": "2020-08-10T23:16:39Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", "document_type": "page", "popularity": 1, - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An introduction to how to get data into New Relic. ", + "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.86501, + "_score": 94.575714, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Annotate logs for logs in context using APM agent APIs", - "sections": "Logs in context with agent APIs", - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "category_2": "Logs in context with agent APIs", - "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" + "sections": "APIs for sending metrics, traces, logs, and events", + "category_0": "Telemetry Data Platform", + "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" }, - "id": "5f37535c196a67c8c055e5ff" + "id": "5f24aa60196a67ede394f5f3" }, { "category_2": "Custom events", - "nodeid": 6256, + "nodeid": 13661, "sections": [ "Event data sources", "Default events", "Custom events", - "APM: Report custom events", - "Data considerations", - "Record a custom event", - "Timestamps", - "Limits and restricted characters", + "Data requirements and limits for custom event data", + "General requirements", "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "APM: Report custom events", + "title": "Data requirements and limits for custom event data", "category_0": "Insights", "type": "docs", "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "published_at": "2020-10-03T15:13:27Z", - "updated_at": "2020-09-24T07:10:11Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "New Relic APM: how to report custom events and attributes.", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 71.15189, + "_score": 80.94, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "APM: Report custom events", - "sections": "Custom events", - "info": "New Relic APM: how to report custom events and attributes.", + "title": "Data requirements and limits for custom event data", + "sections": "Additional Event API requirements", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "category_2": "Custom events", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f480a5a64441f578bfdcdb1" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "category_2": "Custom events", - "nodeid": 13806, + "category_2": "Java agent release notes", + "nodeid": 36271, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", - "For more help" + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 5.8.0", + "New features", + "New OSS SDK", + "Fixes" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "Java Agent 5.8.0", + "category_0": "Release notes", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "category_1": "APM agent release notes", + "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", - "document_type": "page", - "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 56.2564, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Report custom event data", - "sections": "Custom events", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" - }, - "id": "5e8e7f9de7b9d2aa122cf0f6" - }, - { - "sections": [ - "Collect data from any source", - "Agent APIs", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API", - "Log API" - ], - "title": "Collect data from any source", - "type": "developer", - "tags": [ - "Agent API", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API" - ], - "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", - "image": "", - "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", - "published_at": "2020-10-04T02:06:16Z", - "updated_at": "2020-08-14T01:45:09Z", - "document_type": "page", - "popularity": 1, - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", + "published_at": "2020-10-03T22:39:52Z", + "updated_at": "2019-10-31T15:19:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 53.372566, + "_score": 72.52545, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Agent APIs", - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "tags": "Agent API", - "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" + "title": "Java Agent 5.8.0", + "sections": "APM agent release notes", + "category_1": "APM agent release notes", + "category_2": "Java agent release notes", + "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" }, - "id": "5efa997128ccbc3c9a307dfd" + "id": "5dbafb88196a67d9b59aa23d" } ], - "/build-apps/add-time-picker-guide": [ + "/explore-docs/nr1-cli": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", + "published_at": "2020-10-05T01:56:44Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.64691, + "_score": 109.05165, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add a time picker to your app", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f28bd6a64441f9817b11a38" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "published_at": "2020-10-04T01:55:57Z", - "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "title": "Intro to NerdStorage", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-05T01:56:44Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.40387, + "_score": 105.54924, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add a time picker to your app", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989ee7b9d2048e7bab92" }, { "sections": [ @@ -1143,7 +1264,7 @@ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-04T02:12:13Z", + "published_at": "2020-10-05T01:55:26Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -1151,126 +1272,105 @@ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.90595, + "_score": 71.914055, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One apps", - "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" }, "id": "5efa989e28ccbc4071307de5" }, { "sections": [ - "Add tables to your New Relic One application", + "Set up your development environment", "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Add tables to your New Relic One application", + "title": "Set up your development environment", "type": "developer", "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-04T02:14:28Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.27358, + "_score": 55.75344, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5efa9973e7b9d242237bab39" }, { - "image": "", - "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "PlatformStateContext", - "Usage", - "Props" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "published_at": "2020-10-04T02:10:38Z", - "title": "PlatformStateContext", - "updated_at": "2020-08-01T01:47:08Z", + "title": "Nerdpack file structure", "type": "developer", - "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.87625, + "_score": 51.513046, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "PlatformStateContext", - "sections": "PlatformStateContext", - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component." + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "New Relic One CLI", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5efa997128ccbccc6f307dc0" + "id": "5efa989e196a671300766404" } ], - "/automate-workflows/automated-tagging": [ - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-04T02:09:04Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 212.55954, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Automate workflows", - "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", - "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" - }, - "id": "5efa999c196a67dfb4766445" - }, + "/automate-workflows/get-started-new-relic-cli": [ { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -1290,548 +1390,572 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-04T01:55:57Z", + "published_at": "2020-10-05T01:45:14Z", "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.295265, + "_score": 327.34534, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Automate common tasks", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Get started", - "nodeid": 11261, + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", - "For more help" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "Integrations and managed policies", - "category_0": "Integrations", - "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "published_at": "2020-10-05T01:53:44Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.21665, + "_score": 285.4508, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" + "sections": "Set up New Relic using Helm charts", + "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5d6c1f4828ccbce6928f6fe0" + "id": "5efa999c196a67dfb4766445" }, { - "category_2": "Examples", - "nodeid": 34236, "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph tagging API tutorial", - "Read tags for an entity", - "Add tags for an entity", - "Remove a tag from an entity", - "Delete specific tag values for an entity", - "Replace all tag values for an entity", - "For more help" + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" ], - "title": "NerdGraph tagging API tutorial", - "category_0": "APIs", - "type": "docs", - "category_1": "NerdGraph", - "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "title": "Quickly tag a set of resources", + "type": "developer", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", - "published_at": "2020-10-04T02:41:20Z", - "updated_at": "2020-07-26T05:41:24Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-05T01:55:28Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 86.79772, + "_score": 178.71475, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph tagging API tutorial", - "sections": "NerdGraph tagging API tutorial", - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" + "title": "Quickly tag a set of resources", + "sections": "Install the New Relic CLI", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" }, - "id": "5d8024fc28ccbcc5e9499cf1" + "id": "5efa999d64441fa74a5f7e2d" }, { - "category_2": "Measure DevOps success", - "nodeid": 34966, + "category_2": "Troubleshooting", + "nodeid": 40351, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Tag information not showing up for entity in Infra alert condition", + "Problem", + "Solution", + "Cause", "For more help" ], - "title": "Automate instrumentation", - "category_0": "New Relic solutions", + "title": "Tag information not showing up for entity in Infra alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-10-03T22:22:40Z", - "updated_at": "2020-09-28T01:04:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", - "document_type": "page", - "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.55961, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Automate instrumentation", - "sections": "Automate instrumentation", - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" - }, - "id": "5f5e0c14196a67e25fce6a8a" - } - ], - "/build-apps/publish-deploy": [ - { + "category_1": "New Relic Alerts", + "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", + "published_at": "2020-10-03T15:59:21Z", + "updated_at": "2020-09-30T09:38:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", + "document_type": "troubleshooting_doc", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "Tags from events not indexed by New Relic do not appear.", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 169.3906, + "_score": 153.35783, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "Tag information not showing up for entity in Infra alert condition", + "sections": "New Relic Alerts", + "info": "Tags from events not indexed by New Relic do not appear.", + "category_1": "New Relic Alerts", + "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f4c3992e7b9d2c2d203eddd" }, { + "category_2": "Alerts release notes", + "nodeid": 40771, "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" - ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "Component: Violation Tags", + "Update:" ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_0": "Release notes", + "type": "docs", + "category_1": "New Relic Platform release notes", + "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-04T02:16:58Z", - "updated_at": "2020-09-02T02:04:41Z", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", + "published_at": "2020-10-03T19:08:20Z", + "updated_at": "2020-09-29T16:10:16Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", + "popularity": 1, + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 151.771, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", + "category_1": "New Relic Platform release notes", + "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + }, + "id": "5f735c6928ccbc5f5d337dbb" + } + ], + "/explore-docs/nerdstorage": [ + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 59.429714, + "_score": 422.9979, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "managing apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "title": "Build apps", + "sections": "Add, query, and mutate data using NerdStorage", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "5f45bf2864441ffb4dfdcdbb" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Hosting services", - "nodeid": 13151, "sections": [ - "Node.js agent", - "Getting started", - "Installation and configuration", - "Supported features", - "Attributes", - "API guides", - "Hosting services", - "Troubleshooting", - "Install New Relic Node.js agent in GAE flexible environment", - "Use native deploy", - "Build a custom runtime", - "Optional: Disable health checks", - "Get New Relic agent troubleshooting logs from GAE", - "For more help" + "Add, query, and mutate data using NerdStorage", + "Before you begin", + "Get started", + "Add data to NerdStorage", + "Query data from NerdStorage", + "Mutate data in NerdStorage", + "Delete collection from NerdStorage", + "Next steps" ], - "title": "Install New Relic Node.js agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Node.js agent", - "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:40:01Z", - "updated_at": "2020-08-18T06:29:37Z", - "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "title": "Add, query, and mutate data using NerdStorage", + "type": "developer", + "tags": [ + "add data", + "query data", + "mutate data", + "nerdstorage" + ], + "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", + "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", + "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-08-30T01:49:16Z", "document_type": "page", "popularity": 1, - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 31.68496, + "_score": 266.74927, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use native deploy", - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + "title": "Add, query, and mutate data using NerdStorage", + "sections": "Add, query, and mutate data using NerdStorage", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "tags": "nerdstorage", + "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" }, - "id": "5972fea707552313d3f9ba8d" + "id": "5efa98d4e7b9d26d6b7bab74" }, { - "category_2": "Hosting services", - "nodeid": 13866, "sections": [ - "Python agent", - "Getting started", - "Installation", - "Configuration", - "Supported features", - "Back-end services", - "Custom instrumentation", - "API guides", - "Python agent API", - "Web frameworks and servers", - "Hosting services", - "Attributes", - "Troubleshooting", - "Install the Python agent in GAE flexible environment", - "Deploy using GAE's native support", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Install the Python agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Python agent", - "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:11:18Z", - "updated_at": "2020-08-30T17:24:26Z", - "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-05T01:55:26Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 21.474327, + "_score": 198.26744, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Deploy using GAE's native support", - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" }, - "id": "5f3fb624196a672fda1cd4a3" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Installation", - "nodeid": 13121, "sections": [ - "Go agent", - "Get started", - "Installation", - "Configuration", - "Instrumentation", - "API guides", - "Features", - "Troubleshooting", - "Install the Go agent in GAE flexible environment", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Install the Go agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Go agent", - "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", - "published_at": "2020-10-03T17:53:58Z", - "updated_at": "2020-08-15T09:48:00Z", - "breadcrumb": "Contents / APM agents / Go agent / Installation", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 19.89228, + "_score": 179.39986, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI Reference", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f37af50196a67d8f955e63e" - } - ], - "/explore-docs/nr1-cli": [ + "id": "5efa989ee7b9d2024b7bab97" + }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic One CLI Nerdpack commands", + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 149.02466, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + }, + "id": "5efa989e28ccbc535a307dd0" + } + ], + "/explore-docs/nr1-nerdpack": [ + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "sections": [ + "New Relic One CLI subscription commands", "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", + "nr1 subscription:set", + "Subscribe to a Nerdpack", "Usage", "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Aliases", + "nr1 subscription:list", + "See your subscription", + "nr1 subscription:unset", + "Unsubscribe from a Nerdpack" ], - "published_at": "2020-10-04T02:14:29Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "published_at": "2020-10-05T01:58:07Z", + "title": "New Relic One CLI subscription commands", + "updated_at": "2020-08-06T01:44:54Z", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 111.674515, + "_score": 769.92395, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "title": "New Relic One CLI subscription commands", + "sections": "New Relic One CLI subscription commands", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5f2b6096e7b9d225ebc9de6f" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Intro to NerdStorage", + "published_at": "2020-10-05T01:56:44Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.45778, + "_score": 542.0252, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Intro to New Relic One API components", + "title": "New Relic One CLI reference", "type": "developer", "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "New Relic One app", + "nerdpack commands" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 68.01043, + "_score": 283.66217, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa989e28ccbc535a307dd0" }, { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "New Relic One CLI catalog commands", + "Command details", + "nr1 catalog:info", + "Get catalog details", + "Usage", + "Options", + "nr1 catalog:submit", + "Send info to the catalog" ], - "title": "Set up your development environment", + "published_at": "2020-10-05T02:04:57Z", + "title": "New Relic One CLI catalog commands", + "updated_at": "2020-08-14T01:49:24Z", "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-04T02:07:32Z", - "updated_at": "2020-08-26T01:47:20Z", + "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 52.33963, + "_score": 155.27676, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "New Relic One CLI catalog commands", + "sections": "New Relic One CLI catalog commands", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5f28bd6a64441f805eb11a26" }, { "sections": [ @@ -1856,7 +1980,7 @@ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-04T02:12:13Z", + "published_at": "2020-10-05T01:56:43Z", "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, @@ -1864,7 +1988,7 @@ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 48.150394, + "_score": 149.77098, "_version": null, "_explanation": null, "sort": null, @@ -1872,494 +1996,426 @@ "title": "Nerdpack file structure", "sections": "Nerdpack file structure", "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "tags": "New Relic One CLI", + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, "id": "5efa989e196a671300766404" } ], - "/collect-data/collect-data-from-any-source": [ + "/build-apps/add-query-mutate-data-nerdstorage": [ { - "category_2": "Ingest APIs", - "nodeid": 35471, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Telemetry SDKs: Report custom telemetry data", - "Requirements and compatibility", - "Available libraries", - "Write your own Telemetry SDK or contribute to an existing one", - "Integrations built with the Telemetry SDKs", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Telemetry SDKs: Report custom telemetry data", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", - "published_at": "2020-10-03T22:04:50Z", - "updated_at": "2020-09-17T14:37:52Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 160.75787, + "_score": 409.99847, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Telemetry SDKs: Report custom telemetry data", - "sections": "Telemetry SDKs: Report custom telemetry data", - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "category_0": "Telemetry Data Platform", - "category_2": "Ingest APIs", - "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "sections": "Add, query, and mutate data using NerdStorage", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" }, - "id": "5d89fefbe7b9d2537ed30dc1" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Custom events", - "nodeid": 13806, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", - "For more help" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Report custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-05T01:56:44Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.70073, + "_score": 115.0336, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Event data sources", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Intro to NerdStorage", + "sections": "Intro to NerdStorage", + "info": "Intro to NerdStorage on New Relic One", + "tags": "nerdstorage", + "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Get started", - "nodeid": 36051, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Get data into New Relic", - "New Relic-built agents and integrations", - "Agent APIs", - "Telemetry SDKs", - "APIs for sending metrics, traces, logs, and events", - "New Relic One applications", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Get data into New Relic", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", - "published_at": "2020-10-04T03:02:05Z", - "updated_at": "2020-08-10T23:16:39Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "An introduction to how to get data into New Relic. ", - "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.27927, + "_score": 87.69675, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "APIs for sending metrics, traces, logs, and events", - "category_0": "Telemetry Data Platform", - "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5f24aa60196a67ede394f5f3" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Custom events", - "nodeid": 13661, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "title": "Query and store data", + "type": "developer", + "tags": [ + "nerdgraph query components", + "mutation components", + "static methods" + ], + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 86.05269, + "_score": 78.478065, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Additional Event API requirements", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Query and store data", + "sections": "Query and store data", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa989e28ccbc2f15307deb" }, { - "category_2": "Java agent release notes", - "nodeid": 36271, + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 5.8.0", - "New features", - "New OSS SDK", - "Fixes" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" ], - "title": "Java Agent 5.8.0", - "category_0": "Release notes", - "type": "docs", - "category_1": "APM agent release notes", - "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", - "published_at": "2020-10-03T22:39:52Z", - "updated_at": "2019-10-31T15:19:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", + "published_at": "2020-10-05T01:53:45Z", + "title": "Collect data", + "updated_at": "2020-10-05T01:53:44Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "document_type": "page", + "popularity": 1, + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 74.00528, + "_score": 73.86482, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Java Agent 5.8.0", - "sections": "APM agent release notes", - "category_1": "APM agent release notes", - "category_2": "Java agent release notes", - "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" + "title": "Collect data", + "sections": "Query data with NRQL", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5dbafb88196a67d9b59aa23d" + "id": "5efa997328ccbc768c307de2" } ], - "/build-apps/howto-use-nrone-table-components": [ + "/build-apps/add-time-picker-guide": [ { "image": "", - "url": "https://developer.newrelic.com/components/table-header-cell/", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "TableHeaderCell", - "Usage", - "Props" - ], - "published_at": "2020-10-04T02:13:34Z", - "title": "TableHeaderCell", - "updated_at": "2020-08-03T04:46:36Z", - "type": "developer", - "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d", - "document_type": "page", - "popularity": 1, - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 522.06494, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "TableHeaderCell", - "sections": "TableHeaderCell", - "info": "A TableHeaderCell component!", - "body": "TableHeaderCell Usage Copy Props There are no props for this component." - }, - "id": "5efa9906196a67523e76646e" - }, - { - "image": "", - "url": "https://developer.newrelic.com/components/table-row/", - "sections": [ - "TableRow", - "Usage", - "Props" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "published_at": "2020-10-04T02:13:34Z", - "title": "TableRow", - "updated_at": "2020-08-03T04:45:42Z", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", "type": "developer", - "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 431.76508, + "_score": 151.28787, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "TableRow", - "sections": "TableRow", - "info": "A TableRow component!", - "body": "TableRow Usage Copy Props There are no props for this component." + "title": "Build apps", + "sections": "Add a time picker to your app", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa98d564441f93435f7e24" + "id": "5efa999d64441fc0f75f7e21" }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", "Add a table to your app", + "Collect data - any source", + "Automate common tasks", "Create a custom map view", - "Publish and deploy apps" + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", + "published_at": "2020-10-05T01:45:14Z", + "title": "New Relic Developers", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 421.43872, + "_score": 151.173, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "sections": "Add a time picker to your app", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Cloud adoption", - "nodeid": 16121, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Create application baselines", - "1. Identify components", - "2. Determine compatibility", - "3. Deploy monitoring", - "4. Gather metrics", - "5. Set up Dashboards", - "Expert tips", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Create application baselines", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "e971df6f5f6a6360b22e2929f33f9d7af6ff130f", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/create-application-baselines", - "published_at": "2020-10-03T21:26:31Z", - "updated_at": "2020-09-27T20:07:57Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-05T01:55:26Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 293.6967, + "_score": 118.285675, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create application baselines", - "sections": "1. Identify components", - "info": "Use New Relic to establish a baseline to use for comparison during your cloud adoption process.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack" + "tags": "New Relic One apps", + "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" }, - "id": "5ad48685c75d0766faa181bd" + "id": "5efa989e28ccbc4071307de5" }, { "sections": [ - "Map page views by region in a custom app", + "Add tables to your New Relic One application", "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "title": "Map page views by region in a custom app", + "title": "Add tables to your New Relic One application", "type": "developer", "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-04T02:14:58Z", + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-05T01:53:45Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 291.01334, + "_score": 116.20769, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Import the TableChart component", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " with a single row To add a table with a single row, in the index.js file, replace this line: return <h1>Hello, pageview-app-nerdlet Nerdlet!</h1>; Copy with this export code: export default class PageViewApp extends React.Component { render() { return ( <div className="container"> <div className="row"></div" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" }, - "id": "5efa993c196a67066b766469" - } - ], - "/explore-docs/newrelic-cli": [ + "id": "5efa989ee7b9d2ad567bab51" + }, { "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "PlatformStateContext", + "Usage", + "Props" ], - "published_at": "2020-10-04T02:09:04Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", + "published_at": "2020-10-05T02:03:34Z", + "title": "PlatformStateContext", + "updated_at": "2020-08-01T01:47:08Z", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 821.24097, + "_score": 94.08571, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + "title": "PlatformStateContext", + "sections": "PlatformStateContext", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component." }, - "id": "5efa999c196a67dfb4766445" - }, + "id": "5efa997128ccbccc6f307dc0" + } + ], + "/collect-data/custom-attributes": [ { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "image": "", + "url": "https://developer.newrelic.com/collect-data/", + "sections": [ + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" + ], + "published_at": "2020-10-05T01:53:45Z", + "title": "Collect data", + "updated_at": "2020-10-05T01:53:44Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "document_type": "page", + "popularity": 1, + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 148.25171, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Add custom attributes", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + }, + "id": "5efa997328ccbc768c307de2" + }, + { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ "Mark your calendar for Nerd Days 1.0", "Get coding", @@ -2376,629 +2432,362 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-04T01:55:57Z", + "published_at": "2020-10-05T01:45:14Z", "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 820.3031, + "_score": 93.54231, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Add custom attributes", + "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" }, "id": "5d6fe49a64441f8d6100a50f" }, { "category_2": "Measure DevOps success", - "nodeid": 34966, + "nodeid": 16556, "sections": [ "New Relic solutions", "Measure DevOps success", "Cloud adoption", "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", + "Customer experience improvement: track experience indicators", + "Prerequisites", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Utilize data to separate performance by cohort and debug issues at the customer level", "For more help" ], - "title": "Automate instrumentation", + "title": "Customer experience improvement: track experience indicators", "category_0": "New Relic solutions", "type": "docs", "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-10-03T22:22:40Z", - "updated_at": "2020-09-28T01:04:02Z", + "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-03T21:48:58Z", + "updated_at": "2020-09-27T21:45:56Z", "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 712.25256, + "_score": 90.997696, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" + "title": "Customer experience improvement: track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" }, - "id": "5f5e0c14196a67e25fce6a8a" + "id": "5f5adb2728ccbc7152532752" }, { + "category_2": "Optimize your cloud native environment", + "nodeid": 32796, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: Track experience indicators", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Use data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Customer experience improvement: Track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-04T01:39:59Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 577.55164, + "_score": 90.84865, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "title": "Customer experience improvement: Track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f5ac17528ccbce4f0532733" }, { - "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", - "url": "https://developer.newrelic.com/nerd-days/", + "category_2": "Browser agent release notes", + "nodeid": 40791, "sections": [ - "Nerd Days is a free 1-day event focused on building more perfect software", - "Register for Nerd Days 1.0", - "What’s is Nerd Days exactly…", - "Save the date & join us online", - "Additional Nerd Days Events", - "REGISTER FOR NERD DAYS | AMERICAS", - "Speaker line up", - "Aaron Soto", - "Caitlin Halla", - "David Shanker", - "Jeremy Cooper", - "Joel Worrall", - "John Vajda", - "Jon Thurman", - "Justin Eveland", - "Leon Chapman", - "Lindsy Farina", - "Talia Nassi", - "Thomas Martin", - "Alec Swanson", - "Brian Thomason", - "Chris Trombley", - "Gabe O'Brien", - "Liam Hurrell", - "Michael Caron", - "Phil Weber", - "Sebastian Remirez", - "Tracks", - "Observability", - "Cloud migration", - "Open source", - "Devops journey", - "Fundamentals", - "Nerd Days AMER Agenda", - "DevOps journey", - "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", - "Instrumenting your service using agents", - "New Relic CLI Wizardry", - "5 Steps to Kubernetes Observability", - "Delivering SRE as a Service", - "Building applications on New Relic One", - "Exploring your data using NRQL", - "New Relic AI", - "Going Serverless: Chipping at the monolith", - "Logging for Modern Organizations", - "Grafana and Prometheus with New Relic", - "Lunch with Lew", - "Custom Instrumentation", - "Exploring Data with NerdGraph", - "Tool Consolidation", - "Testing in Production", - "How Open Source powers the New Relic One Catalog", - "Alerts Best Practices", - "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", - "Monitoring your Cloud Usage and Spend", - "Measuring code pipelines", - "Reducing toil with Terraform", - "True availability using Synthetics", - "How Observability-Driven Development accelerates DevOps transformations", - "AWS Modernization", - "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", - "NerdStorageVault: ThirdParty Secrets", - "Closing + Swag", - "Engage with the developer community" + "Browser agent release notes", + "Browser Agent v1184", + "Release Dates", + "New Features", + "Added support for custom attributes on PageViewTiming events", + "Issue Resolutions", + "How to upgrade your agent" ], - "published_at": "2020-10-04T02:18:25Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T02:00:34Z", - "type": "developer", - "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", - "document_type": "page", - "popularity": 1, - "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", + "title": "Browser Agent v1184", + "category_0": "Release notes", + "type": "docs", + "category_1": "Browser agent release notes", + "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", + "published_at": "2020-10-03T14:39:21Z", + "updated_at": "2020-10-02T05:37:45Z", + "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 554.49316, + "_score": 82.159515, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic CLI Wizardry", - "body": " of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes" + "sections": "Added support for custom attributes on PageViewTiming events", + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" }, - "id": "5f3dd5bf28ccbc2349f56e4e" + "id": "5f76bca928ccbcaa75337d9b" } ], - "/automate-workflows/get-started-new-relic-cli": [ + "/terms": [ { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Product definitions", + "nodeid": 39646, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-04T01:55:57Z", - "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "License information", + "General usage licenses", + "Special services licenses", + "Distributed licenses", + "Referenced policies", + "Product definitions", + "Usage plans", + "FAQ", + "New Relic One pricing: Definitions", + "For more help" + ], + "title": "New Relic One pricing: Definitions", + "category_0": "Licenses", + "type": "docs", + "category_1": "License information", + "external_id": "097fc095ef18942f3af1845237742340e36416b8", + "image": "", + "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-09-10T14:58:10Z", + "breadcrumb": "Contents / Licenses / License information / Product definitions", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 330.92087, + "_score": 337.42694, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5f23b039196a67030b94f5c4" }, { "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://opensource.newrelic.com/cla/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "NEW RELIC, INC.", + "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", + "Definitions." ], - "published_at": "2020-10-04T02:09:04Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "published_at": "2020-10-05T02:15:21Z", + "title": "New Relic Open Source Contributor License Agreement", + "updated_at": "2020-09-02T02:08:45Z", + "type": "opensource", + "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", + "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 310.7852, + "_score": 332.1804, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" }, - "id": "5efa999c196a67dfb4766445" + "id": "5f31822264441fcbe056a984" }, { + "category_2": "Developer Edition", + "nodeid": 39641, "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" - ], - "title": "Quickly tag a set of resources", - "type": "developer", - "tags": [ - "tags", - "new relic CLI" + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Developer Program Resources", + "For more help" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "title": "Developer Program Resources", + "category_0": "Licenses", + "type": "docs", + "category_1": "Product or service licenses", + "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-04T02:06:15Z", - "updated_at": "2020-08-14T01:45:08Z", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-08-08T19:17:02Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "New Relic Developer edition policy", + "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 181.16687, + "_score": 331.56372, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Quickly tag a set of resources", - "sections": "Install the New Relic CLI", - "info": "Add tags to applications you instrument for easier filtering and organization.", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5f338507e7b9d2f670c9de83" }, { - "category_2": "Troubleshooting", - "nodeid": 40351, + "category_2": "New Relic One", + "nodeid": 39366, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Preview access for New Relic One", "For more help" ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", + "title": "Preview access for New Relic One", + "category_0": "Licenses", "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", + "category_1": "Product or service licenses", + "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-10-03T15:59:21Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", + "published_at": "2020-10-04T06:02:04Z", + "updated_at": "2020-07-31T04:41:27Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", + "document_type": "page", "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 161.82, + "_score": 323.886, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" }, - "id": "5f4c3992e7b9d2c2d203eddd" + "id": "5f23a0f7e7b9d29da9c82305" }, { - "category_2": "Alerts release notes", - "nodeid": 40771, + "category_2": "Data privacy", + "nodeid": 1591, "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "Component: Violation Tags", - "Update:" + "Security and Privacy", + "Data privacy", + "Compliance", + "Information security", + "Security bulletins", + "Security controls for privacy", + "Secured content", + "Analytics", + "Data transmission and firewalls", + "Hosting and data storage", + "Data access", + "HTTP parameters disabled by default", + "For more help" ], - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_0": "Release notes", + "title": "Security controls for privacy", + "category_0": "New Relic Security and Privacy", "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", + "category_1": "Security and Privacy", + "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", - "published_at": "2020-10-03T19:08:20Z", - "updated_at": "2020-09-29T16:10:16Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", + "published_at": "2020-10-04T07:08:53Z", + "updated_at": "2020-09-24T07:44:02Z", + "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", - "info": "", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 159.57465, + "_score": 312.1698, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_1": "New Relic Platform release notes", - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + "sections": "Security and Privacy", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "category_0": "New Relic Security and Privacy", + "category_1": "Security and Privacy", + "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" }, - "id": "5f735c6928ccbc5f5d337dbb" + "id": "5e30b8a864441f47ebd05cb0" } ], - "/explore-docs/nerdstorage": [ - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 427.71838, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Build apps", - "sections": "Add, query, and mutate data using NerdStorage", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" - }, - "id": "5efa999d64441fc0f75f7e21" - }, - { - "sections": [ - "Add, query, and mutate data using NerdStorage", - "Before you begin", - "Get started", - "Add data to NerdStorage", - "Query data from NerdStorage", - "Mutate data in NerdStorage", - "Delete collection from NerdStorage", - "Next steps" - ], - "title": "Add, query, and mutate data using NerdStorage", - "type": "developer", - "tags": [ - "add data", - "query data", - "mutate data", - "nerdstorage" - ], - "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", - "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", - "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", - "published_at": "2020-10-04T02:15:55Z", - "updated_at": "2020-08-30T01:49:16Z", - "document_type": "page", - "popularity": 1, - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 270.7021, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Add, query, and mutate data using NerdStorage", - "sections": "Add, query, and mutate data using NerdStorage", - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "tags": "nerdstorage", - "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" - }, - "id": "5efa98d4e7b9d26d6b7bab74" - }, - { - "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 194.9497, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" - }, - "id": "5efa989e28ccbc4071307de5" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 179.55063, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI Reference", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, - { - "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-17T01:51:10Z", - "document_type": "page", - "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.31711, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" - }, - "id": "5efa989e28ccbc535a307dd0" - } - ], - "/explore-docs/nr1-common": [ + "/explore-docs/nr1-common": [ { "sections": [ "New Relic One CLI reference", @@ -3021,7 +2810,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:58:07Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -3029,7 +2818,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 201.90358, + "_score": 198.33485, "_version": null, "_explanation": null, "sort": null, @@ -3055,7 +2844,7 @@ "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-04T02:09:04Z", + "published_at": "2020-10-05T01:53:44Z", "title": "Automate workflows", "updated_at": "2020-10-04T02:09:04Z", "type": "developer", @@ -3066,7 +2855,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 165.71976, + "_score": 152.77304, "_version": null, "_explanation": null, "sort": null, @@ -3095,18 +2884,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-04T01:55:57Z", + "published_at": "2020-10-05T01:45:14Z", "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 150.58218, + "_score": 149.81282, "_version": null, "_explanation": null, "sort": null, @@ -3117,6 +2906,40 @@ }, "id": "5d6fe49a64441f8d6100a50f" }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 130.6808, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, { "category_2": "Troubleshooting", "nodeid": 13726, @@ -3159,7 +2982,7 @@ "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 136.89398, + "_score": 126.639145, "_version": null, "_explanation": null, "sort": null, @@ -3172,522 +2995,679 @@ "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" }, "id": "5e9af5ba28ccbc3d4fd94a21" - }, + } + ], + "/automate-workflows/automated-tagging": [ { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "title": "New Relic CLI Reference", + "published_at": "2020-10-05T01:53:44Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.93639, + "_score": 197.05257, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "Automate workflows", + "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", + "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5efa989ee7b9d2024b7bab97" - } - ], - "/explore-docs/nr1-nerdpack": [ + "id": "5efa999c196a67dfb4766445" + }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic One CLI subscription commands", - "Command details", - "nr1 subscription:set", - "Subscribe to a Nerdpack", - "Usage", - "Options", - "Aliases", - "nr1 subscription:list", - "See your subscription", - "nr1 subscription:unset", - "Unsubscribe from a Nerdpack" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-04T02:14:28Z", - "title": "New Relic One CLI subscription commands", - "updated_at": "2020-08-06T01:44:54Z", + "published_at": "2020-10-05T01:45:14Z", + "title": "New Relic Developers", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", - "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 779.20355, + "_score": 100.24698, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI subscription commands", - "sections": "New Relic One CLI subscription commands", - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" + "sections": "Automate common tasks", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5f2b6096e7b9d225ebc9de6f" + "id": "5d6fe49a64441f8d6100a50f" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Amazon integrations", + "Get started", + "AWS integrations list", + "Troubleshooting", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", + "For more help" ], - "published_at": "2020-10-04T02:15:08Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Integrations and managed policies", + "category_0": "Integrations", + "type": "docs", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 548.70337, + "_score": 88.11081, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5d6c1f4828ccbce6928f6fe0" }, { + "category_2": "Examples", + "nodeid": 34236, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", + "NerdGraph", "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Examples", + "NerdGraph tagging API tutorial", + "Read tags for an entity", + "Add tags for an entity", + "Remove a tag from an entity", + "Delete specific tag values for an entity", + "Replace all tag values for an entity", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "NerdGraph tagging API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "image": "", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", + "published_at": "2020-10-04T02:41:20Z", + "updated_at": "2020-07-26T05:41:24Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 285.4889, + "_score": 86.5648, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" + "title": "NerdGraph tagging API tutorial", + "sections": "NerdGraph tagging API tutorial", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5d8024fc28ccbcc5e9499cf1" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", + "category_2": "Measure DevOps success", + "nodeid": 34966, "sections": [ - "New Relic One CLI catalog commands", - "Command details", - "nr1 catalog:info", - "Get catalog details", - "Usage", - "Options", - "nr1 catalog:submit", - "Send info to the catalog" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Automate instrumentation", + "Prerequisite", + "1. Make instrumentation part of every build", + "2. Take advantage of integrations and existing tools", + "3. Leverage the power of APIs", + "For more help" ], - "published_at": "2020-10-04T02:13:34Z", - "title": "New Relic One CLI catalog commands", - "updated_at": "2020-08-14T01:49:24Z", - "type": "developer", - "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", + "title": "Automate instrumentation", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", + "published_at": "2020-10-03T22:22:40Z", + "updated_at": "2020-09-28T01:04:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 157.33795, + "_score": 82.47502, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI catalog commands", - "sections": "New Relic One CLI catalog commands", - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" + "title": "Automate instrumentation", + "sections": "Automate instrumentation", + "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", + "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" }, - "id": "5f28bd6a64441f805eb11a26" - }, + "id": "5f5e0c14196a67e25fce6a8a" + } + ], + "/build-apps/publish-deploy": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 148.38692, + "_score": 167.10019, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa989e196a671300766404" - } - ], - "/explore-docs/nr1-catalog": [ + "id": "5efa999d64441fc0f75f7e21" + }, { "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "New Relic One CLI reference", + "title": "Permissions for managing applications", "type": "developer", "tags": [ - "New Relic One app", - "nerdpack commands" + "nerdpack manager", + "permissions", + "managing apps" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 292.65353, + "_score": 58.86409, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "managing apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f45bf2864441ffb4dfdcdbb" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Hosting services", + "nodeid": 13151, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Node.js agent", + "Getting started", + "Installation and configuration", + "Supported features", + "Attributes", + "API guides", + "Hosting services", + "Troubleshooting", + "Install New Relic Node.js agent in GAE flexible environment", + "Use native deploy", + "Build a custom runtime", + "Optional: Disable health checks", + "Get New Relic agent troubleshooting logs from GAE", + "For more help" ], - "published_at": "2020-10-04T01:55:57Z", - "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Install New Relic Node.js agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Node.js agent", + "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:40:01Z", + "updated_at": "2020-08-18T06:29:37Z", + "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 198.97215, + "_score": 31.179255, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" + "sections": "Use native deploy", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5972fea707552313d3f9ba8d" }, { + "category_2": "Hosting services", + "nodeid": 13866, + "sections": [ + "Python agent", + "Getting started", + "Installation", + "Configuration", + "Supported features", + "Back-end services", + "Custom instrumentation", + "API guides", + "Python agent API", + "Web frameworks and servers", + "Hosting services", + "Attributes", + "Troubleshooting", + "Install the Python agent in GAE flexible environment", + "Deploy using GAE's native support", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" + ], + "title": "Install the Python agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Python agent", + "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:11:18Z", + "updated_at": "2020-08-30T17:24:26Z", + "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "document_type": "page", + "popularity": 1, + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 21.092176, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Deploy using GAE's native support", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + }, + "id": "5f3fb624196a672fda1cd4a3" + }, + { + "category_2": "Installation", + "nodeid": 13121, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Go agent", + "Get started", + "Installation", + "Configuration", + "Instrumentation", + "API guides", + "Features", + "Troubleshooting", + "Install the Go agent in GAE flexible environment", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "published_at": "2020-10-04T02:15:08Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Install the Go agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Go agent", + "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", + "published_at": "2020-10-03T17:53:58Z", + "updated_at": "2020-08-15T09:48:00Z", + "breadcrumb": "Contents / APM agents / Go agent / Installation", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 168.24901, + "_score": 19.590069, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5f37af50196a67d8f955e63e" + } + ], + "/automate-workflows/get-started-terraform": [ + { + "category_2": "Using monitors", + "nodeid": 6371, + "sections": [ + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Alerts for synthetic monitoring", + "Add a synthetic monitor to alert policies", + "Existing monitor: Remove from alert policy", + "Receive alert notifications on a three-strike basis", + "Mute (disable) monitor's alert notifications", + "For more help" + ], + "title": "Alerts for synthetic monitoring", + "category_0": "Synthetic monitoring", + "type": "docs", + "category_1": "Synthetic monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", + "image": "", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "published_at": "2020-10-03T15:27:33Z", + "updated_at": "2020-10-03T15:27:33Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", + "document_type": "page", + "popularity": 1, + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 144.83583, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Alerts for synthetic monitoring", + "sections": "Mute (disable) monitor's alert notifications", + "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", + "category_0": "Synthetic monitoring", + "category_1": "Synthetic monitoring", + "category_2": "Using monitors", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", + "body": " alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" + }, + "id": "5f31b60e196a6742d2fbd6c8" }, { + "category_2": "Measure DevOps success", + "nodeid": 16501, "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Incident orchestration: Align teams, tools, processes", + "Prerequisites", + "1. Assign first responders to team dashboards", + "2. Determine incident thresholds for alert conditions", + "3. Ensure alerts have auditable notification channels", + "4. Automate triage and resolution steps", + "For more help" ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "title": "Incident orchestration: Align teams, tools, processes", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", + "image": "", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", + "published_at": "2020-10-03T21:47:40Z", + "updated_at": "2020-09-28T00:43:51Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "document_type": "page", + "popularity": 1, + "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", + "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 103.55072, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "3. Ensure alerts have auditable notification channels", + "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" + }, + "id": "5f5b2113e7b9d2249dacfd34" + }, + { + "category_2": "Alert notifications", + "nodeid": 6491, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Test alert notification channels", + "Request the test", + "Troubleshoot the test results", + "For more help" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-02T02:05:55Z", + "title": "Test alert notification channels", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", + "published_at": "2020-10-04T06:46:30Z", + "updated_at": "2020-08-11T04:16:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 139.60403, + "_score": 83.77539, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" + "title": "Test alert notification channels", + "sections": "Test alert notification channels", + "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", + "category_2": "Alert notifications", + "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5f2dbb3664441fd3a556a97c" }, { - "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", - "url": "https://developer.newrelic.com/nerd-days/", + "category_2": "Alert notifications", + "nodeid": 6481, "sections": [ - "Nerd Days is a free 1-day event focused on building more perfect software", - "Register for Nerd Days 1.0", - "What’s is Nerd Days exactly…", - "Save the date & join us online", - "Additional Nerd Days Events", - "REGISTER FOR NERD DAYS | AMERICAS", - "Speaker line up", - "Aaron Soto", - "Caitlin Halla", - "David Shanker", - "Jeremy Cooper", - "Joel Worrall", - "John Vajda", - "Jon Thurman", - "Justin Eveland", - "Leon Chapman", - "Lindsy Farina", - "Talia Nassi", - "Thomas Martin", - "Alec Swanson", - "Brian Thomason", - "Chris Trombley", - "Gabe O'Brien", - "Liam Hurrell", - "Michael Caron", - "Phil Weber", - "Sebastian Remirez", - "Tracks", - "Observability", - "Cloud migration", - "Open source", - "Devops journey", - "Fundamentals", - "Nerd Days AMER Agenda", - "DevOps journey", - "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", - "Instrumenting your service using agents", - "New Relic CLI Wizardry", - "5 Steps to Kubernetes Observability", - "Delivering SRE as a Service", - "Building applications on New Relic One", - "Exploring your data using NRQL", - "New Relic AI", - "Going Serverless: Chipping at the monolith", - "Logging for Modern Organizations", - "Grafana and Prometheus with New Relic", - "Lunch with Lew", - "Custom Instrumentation", - "Exploring Data with NerdGraph", - "Tool Consolidation", - "Testing in Production", - "How Open Source powers the New Relic One Catalog", - "Alerts Best Practices", - "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", - "Monitoring your Cloud Usage and Spend", - "Measuring code pipelines", - "Reducing toil with Terraform", - "True availability using Synthetics", - "How Observability-Driven Development accelerates DevOps transformations", - "AWS Modernization", - "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", - "NerdStorageVault: ThirdParty Secrets", - "Closing + Swag", - "Engage with the developer community" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Update alert notification channels", + "Reference for updating channels", + "Basic process", + "For more help" + ], + "title": "Update alert notification channels", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "ee8bce401d0623e8b85d84a6a20bd8a72b9764ef", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/update-alert-notification-channels", + "published_at": "2020-10-04T06:46:30Z", + "updated_at": "2020-08-11T06:42:27Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "document_type": "page", + "popularity": 1, + "info": "Read about how to update alerts notification channels. ", + "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 80.84828, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Update alert notification channels", + "sections": "Update alert notification channels", + "info": "Read about how to update alerts notification channels. ", + "category_2": "Alert notifications", + "body": " to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add" + }, + "id": "5f2dbad928ccbcb8ca88dfed" + }, + { + "category_2": "Alert notifications", + "nodeid": 6281, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Notification channels: Control where to send alerts", + "View notification channels", + "Add or remove notification channels", + "Instructions for specific notification channels", + "Receive mobile push notifications", + "Acknowledge alert notifications", + "For more help" ], - "published_at": "2020-10-04T02:18:25Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T02:00:34Z", - "type": "developer", - "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", + "title": "Notification channels: Control where to send alerts", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts", + "external_id": "65878aca7993877ee748776c87e9225c90687e3f", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts", + "published_at": "2020-10-03T19:39:18Z", + "updated_at": "2020-08-15T11:49:29Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", "document_type": "page", "popularity": 1, - "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", - "info": "", + "info": "Read about how to set up alerts notification channels so you can be notified when incidents are opened, acknowledged, or closed.", + "body": "You can use alerts to set up notification channels, and attach those channels to policies. Your selected channels provide fast and consistent ways for the right personnel to be notified about incidents. For example, notifications allow you to include charts about the incident to provide context and share them with your team. Alerts offers several notification channels, including webhooks, Slack rooms, email, and more. You'll be notified by your notification channels when incidents are opened, acknowledged, or closed. This document explains the available notification channels and how to set them up. This document is about alerts notifications. For general information about unsubscribing from other New Relic emails, including marketing emails, weekly reports, and announcements, see Unsubscribe from New Relic emails. View notification channels To see all notification channels in your account: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Add or remove notification channels To set up a new notification channel: On the Notification channels, click New notification channel. Select the type of channel and complete other required steps for it. To add or remove a notification policy or channel: Select a specific notification channel, select Alert policies, and add or remove a policy. OR Select a specific policy, select Notification channels, and add or remove a channel. Instructions for specific notification channels These are the available notification channel types. User For your convenience, we automatically load all users and their email addresses for the selected account. If your account has one or more sub-accounts, the notification channel includes only users for the currently selected master or sub-account. Use the User notification channel to select existing account team members and admins. To view the Users list or to add users to alert policies: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. A user channel also sends push notifications to any of the user's registered mobile devices. A device is registered if the user has logged into New Relic using the mobile app on the device. Email We automatically add every individual and their email address on the selected account to the User notification channel and you can select them there. You don't need to add existing New Relic accounts to the Email channel. To add an email channel for other users, follow these guidelines: Field Description Email (required) In general, use the Email notification channel to identify user emails or email aliases that are not already on the selected account. For example, if you have a dev-ops@company.com email alias for your DevOps team, add the email alias to the Email channel. Otherwise, use the User notification channel to select specific users on your DevOps team. For easier maintenance, add a single non-user email address or alias to a single alert notification channel. If you want to use the email channel for more than one email, create an email group or alias outside your account. These email addresses can be the same as or different from email addresses already on your account. Users can unsubscribe from general (non-alerts-related) emails, but they cannot unsubscribe from alerts email notifications. Instead, the account Owner, Admin, or add-on manager must remove users from the policy's email notification channel. Include JSON attachment (optional) To include a JSON attachment with the email notification, select this checkbox. OpsGenie You must have an existing OpsGenie account integrated with New Relic in order to provide the following information: Field Description Channel name (required) A meaningful name for the OpsGenie notification channel (maximum 64 characters). API key (required) The API key generated from your OpsGenie integration used to authenticate API requests. Teams (optional) List of team names that are responsible for the alert. OpsGenie runs team escalation policies to calculate which users will receive notifications. Tags (optional) A comma-separated list of labels attached to the alert. To overwrite the OpsGenie Quiet Hours setting for urgent alerts, add an OverwriteQuietHours tag. Recipients (optional) One or more names of users, groups, on-call schedules, escalation policies, etc., that OpsGenie uses to calculate where to send notifications. PagerDuty You must have an existing PagerDuty account in order to provide the following information: Field Description Service name (required) The name of your service integrating with PagerDuty for notifications. Integration key (required) The unique service identifier used by PagerDuty's Integration API to trigger, acknowledge, and resolve incidents for the service. Slack Before adding Slack notifications, you must create a unique webhook integration using Slack's New Relic integration. If you want web, transaction, server, and mobile alerts to be posted in separate channels, you must set up separate integrations for each one. Field Description Channel name (required) A meaningful name for the Slack notification channel (maximum 64 characters); for example, Network Ops Center. URL (required) Copy and paste the New Relic webhook integration URL that you've set up with Slack. For example: https://hooks.slack.com/services/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 Be sure to include https:// in the URL. Do not use http://. Team channel (optional) If used, include # before the name of the Slack channel where alert notifications are sent; for example, #NOC. VictorOps You must have an existing VictorOps account in order to provide the following required information: Field Description Channel name (required) A meaningful name for this notification channel (maximum 64 characters). For example, if the VictorOps Route key is for your Technical Support team, you could name this channel Tech Support - VictorOps. Key (required) VictorOps generates a unique key for each account. It maps the VictorOps account to its associated integrations. Route key (optional) This key maps the alert or incident to a specific team. Webhook Webhooks are HTTP POST messages containing JSON documents delivered to a destination URL. When an incident is opened, acknowledged, or closed, our webhook feature sends a message to your URL with any relevant information, such as a description of the event and a link back to New Relic. You also have the option to customize the payload in the POST message for further integration into your system. If your endpoint does not acknowledge the POST request within 10 seconds, the Alerts UI may indicate a failed notification event for the related incident. Before adding webhook notifications, you must have an endpoint set up to respond with a status code between 200 and 206 after receiving the following required information: Field Description Channel name (required) A meaningful name for the webhook (maximum 64 characters). Base url (required) The endpoint that will receive the POST message and trigger customized behaviors in your system. If you want to include a port number in the webhook URL, make sure the port is available for requests. Otherwise the webhook will not work. Basic auth (optional) To require basic authentication for the webhook, select Add basic auth, and provide the user name and password to authenticate the webhook. Custom headers (optional) To include headers with webhooks, select Add custom headers, and provide the name and value for each header. Use custom payload (optional) To use the default values, leave blank. To view and edit the default values, select Add custom payload. Payload (for custom payloads only) Your customized POST message code. This field includes: A list of variables you can use Syntax highlighting, based on payload type Payload type (for custom payloads only) Specify the message format: JSON (default) or Form. xMatters You must have an existing xMatters account in order to provide the following information: Field Description Channel name (required) Name your channel so you can identify it easily when associating it with a policy. Integration url (required) The unique integration url provided by xMatters pointing to your xMatters account. Receive mobile push notifications In order to receive mobile push notifications, your device must be registered and listed in (account) > User preferences. If the device is not listed in User preferences, log out of the app, log back in, and check again to see if it is listed. To receive mobile push notifications: Log in to your New Relic account via the mobile app at least once to ensure the device is registered. Add the user channel to the alert policy. Switch push notifications On for the device. Acknowledge alert notifications Anyone in your account can acknowledge notifications through the user interface or email notification. Acknowledging an incident in New Relic also acknowledges any associated incident in PagerDuty. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 135.93369, + "_score": 79.12568, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "How Open Source powers the New Relic One Catalog", - "body": " Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie" + "title": "Notification channels: Control where to send alerts", + "sections": "Notification channels: Control where to send alerts", + "info": "Read about how to set up alerts notification channels so you can be notified when incidents are opened, acknowledged, or closed.", + "category_2": "Alert notifications", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts", + "body": " account: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Add or remove notification channels To set up a new notification channel: On the Notification channels, click New notification channel. Select the type of channel and complete other required steps" }, - "id": "5f3dd5bf28ccbc2349f56e4e" + "id": "5f2dbad864441fb7d256a9db" } ], "/collect-data/get-started-nerdgraph-api-explorer": [ @@ -3722,7 +3702,7 @@ "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 221.17136, + "_score": 213.31656, "_version": null, "_explanation": null, "sort": null, @@ -3773,7 +3753,7 @@ "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 155.96222, + "_score": 153.7908, "_version": null, "_explanation": null, "sort": null, @@ -3793,591 +3773,368 @@ "Collect data", "Guides to collect data", "Add custom attributes", - "Collect data - any source", "Create custom events", + "Collect data - any source", "Build queries with NerdGraph", "Query data with NRQL" ], - "published_at": "2020-10-04T02:07:32Z", + "published_at": "2020-10-05T01:53:45Z", "title": "Collect data", - "updated_at": "2020-10-04T02:07:32Z", + "updated_at": "2020-10-05T01:53:44Z", "type": "developer", "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.17467, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Build queries with NerdGraph", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" - }, - "id": "5efa997328ccbc768c307de2" - }, - { - "category_2": "Examples", - "nodeid": 17141, - "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph cloud integrations API tutorial", - "Requirements", - "Access the NerdGraph GraphiQL explorer", - "Query examples", - "Mutation examples", - "Enable an Amazon AWS integration", - "Change polling interval for Amazon AWS integration", - "Disable Amazon AWS integration", - "For more help" - ], - "title": "NerdGraph cloud integrations API tutorial", - "category_0": "APIs", - "type": "docs", - "category_1": "NerdGraph", - "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", - "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", - "published_at": "2020-10-03T22:02:24Z", - "updated_at": "2020-08-10T23:22:01Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.75859, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "NerdGraph cloud integrations API tutorial", - "sections": "NerdGraph", - "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", - "category_1": "NerdGraph", - "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", - "breadcrumb": "Contents / APIs / NerdGraph / Examples" - }, - "id": "5d83537b28ccbc263a1b7bf7" - }, - { - "nodeid": 37711, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "NerdGraph API: NRQL condition alerts", - "Steps to create a NRQL condition", - "NRQL static condition", - "NRQL baseline condition", - "NRQL outlier condition", - "Update a condition", - "Update mutations", - "List and filter NRQL conditions", - "Singular NRQL condition queries", - "Update the description", - "Delete conditions", - "For more help" - ], - "title": "NerdGraph API: NRQL condition alerts ", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", - "published_at": "2020-10-04T05:11:59Z", - "updated_at": "2020-08-11T04:56:49Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", - "document_type": "page", - "popularity": 1, - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.24791, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "NerdGraph API: NRQL condition alerts ", - "sections": "Update mutations", - "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", - "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" - }, - "id": "5f2dee1128ccbc562e88dfc1" - } - ], - "/build-apps/permission-manage-apps": [ - { - "category_2": "Original users and roles", - "nodeid": 1101, - "sections": [ - "Original accounts and billing", - "Original product-based pricing", - "Original users and roles", - "SAML SSO (original users)", - "Original data retention", - "Original pricing plan usage", - "Users and roles (original user model)", - "View and manage users", - "User types: basic user and full user", - "Account roles", - "Add-on roles", - "Account permissions", - "Alert permissions", - "APM permissions", - "Browser permissions", - "Infrastructure permissions", - "Insights permissions", - "Mobile permissions", - "Synthetics permissions", - "Workloads", - "For more help" - ], - "title": "Users and roles (original user model)", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Original accounts and billing", - "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", - "image": "", - "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", - "published_at": "2020-10-03T17:04:51Z", - "updated_at": "2020-10-03T17:04:51Z", - "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", - "document_type": "page", - "popularity": 1, - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 170.47983, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Account permissions", - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" - }, - "id": "5f3e194028ccbc18c7f56de3" - }, - { - "category_2": "Get started", - "nodeid": 11261, - "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", - "For more help" - ], - "title": "Integrations and managed policies", - "category_0": "Integrations", - "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", - "document_type": "page", - "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.60466, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Integrations and managed policies", - "sections": "Option 2: Manually add permissions", - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" - }, - "id": "5d6c1f4828ccbce6928f6fe0" - }, - { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", - "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" - ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", - "document_type": "page", - "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.88399, + "_score": 151.9705, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Permissions for managing applications", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" + "sections": "Build queries with NerdGraph", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa997328ccbc768c307de2" }, { - "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", - "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", + "category_2": "Examples", + "nodeid": 17141, "sections": [ - "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "About this Learncast", - "Prerequisites", - "Virtual Training Session List" + "NerdGraph", + "Get started", + "Examples", + "NerdGraph cloud integrations API tutorial", + "Requirements", + "Access the NerdGraph GraphiQL explorer", + "Query examples", + "Mutation examples", + "Enable an Amazon AWS integration", + "Change polling interval for Amazon AWS integration", + "Disable Amazon AWS integration", + "For more help" ], - "published_at": "2020-10-04T01:58:34Z", - "title": "Live Learncast: New Relic One Programmability", - "updated_at": "2020-07-31T01:40:49Z", - "type": "", - "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", + "title": "NerdGraph cloud integrations API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "15caa0b35be84f2e6245826a5c9ac8e49cad6a89", + "image": "", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-cloud-integrations-api-tutorial", + "published_at": "2020-10-03T22:02:24Z", + "updated_at": "2020-08-10T23:22:01Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "document_type": "page", "popularity": 1, - "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", - "info": "", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.57933, + "_score": 121.137344, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" + "title": "NerdGraph cloud integrations API tutorial", + "sections": "NerdGraph", + "info": "Use New Relic's NerdGraph (our GraphQL API) to query your New Relic Infrastructure cloud integration data. ", + "category_1": "NerdGraph", + "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying", + "breadcrumb": "Contents / APIs / NerdGraph / Examples" }, - "id": "5dc618cbe7b9d2a0a8e4649c" + "id": "5d83537b28ccbc263a1b7bf7" }, { + "nodeid": 37711, "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" - ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "NerdGraph API: NRQL condition alerts", + "Steps to create a NRQL condition", + "NRQL static condition", + "NRQL baseline condition", + "NRQL outlier condition", + "Update a condition", + "Update mutations", + "List and filter NRQL conditions", + "Singular NRQL condition queries", + "Update the description", + "Delete conditions", + "For more help" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-02T02:05:55Z", + "title": "NerdGraph API: NRQL condition alerts ", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "external_id": "86591bd20017930f1e4eef1b1a76e3806298dbb9", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-nrql-condition-alerts", + "published_at": "2020-10-04T05:11:59Z", + "updated_at": "2020-08-11T04:56:49Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 78.55923, + "_score": 119.665276, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Add images and metadata to your apps", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" + "title": "NerdGraph API: NRQL condition alerts ", + "sections": "Update mutations", + "info": "Examples of how to use the NerdGraph API explorer to create alert conditions, queries, and mutations.", + "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alerts and Nerdgraph" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5f2dee1128ccbc562e88dfc1" } ], - "/automate-workflows/get-started-terraform": [ + "/explore-docs/nerdpack-file-structure": [ { - "category_2": "Using monitors", - "nodeid": 6371, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Alerts for synthetic monitoring", - "Add a synthetic monitor to alert policies", - "Existing monitor: Remove from alert policy", - "Receive alert notifications on a three-strike basis", - "Mute (disable) monitor's alert notifications", - "For more help" + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" ], - "title": "Alerts for synthetic monitoring", - "category_0": "Synthetic monitoring", - "type": "docs", - "category_1": "Synthetic monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", - "image": "", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "published_at": "2020-10-03T15:27:33Z", - "updated_at": "2020-10-03T15:27:33Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-08-21T01:45:19Z", "document_type": "page", "popularity": 1, - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 157.19217, + "_score": 418.36847, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Alerts for synthetic monitoring", - "sections": "Mute (disable) monitor's alert notifications", - "info": "New Relic can use alerts to notify you about synthetic monitors's failures.", - "category_0": "Synthetic monitoring", - "category_1": "Synthetic monitoring", - "category_2": "Using monitors", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "body": " alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors" + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "Nerdpack file structure", + "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" }, - "id": "5f31b60e196a6742d2fbd6c8" + "id": "5efa9973196a67d16d76645c" }, { - "category_2": "Measure DevOps success", - "nodeid": 16501, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Incident orchestration: Align teams, tools, processes", - "Prerequisites", - "1. Assign first responders to team dashboards", - "2. Determine incident thresholds for alert conditions", - "3. Ensure alerts have auditable notification channels", - "4. Automate triage and resolution steps", - "For more help" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Incident orchestration: Align teams, tools, processes", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "0bec265edc6b4792a80c5a5810e624d5545fbc4e", - "image": "", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/incident-orchestration-align-teams-tools-processes", - "published_at": "2020-10-03T21:47:40Z", - "updated_at": "2020-09-28T00:43:51Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. ", - "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.87247, + "_score": 328.8902, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "3. Ensure alerts have auditable notification channels", - "body": " to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, - "id": "5f5b2113e7b9d2249dacfd34" + "id": "5efa989e28ccbc535a307dd0" }, { - "category_2": "Alert notifications", - "nodeid": 6491, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Test alert notification channels", - "Request the test", - "Troubleshoot the test results", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Test alert notification channels", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "fcea4cf920f099fa1fcf7fab3760d57bdf2e02b7", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/test-alert-notification-channels", - "published_at": "2020-10-04T06:46:30Z", - "updated_at": "2020-08-11T04:16:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-05T01:53:44Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.33279, + "_score": 287.19748, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Test alert notification channels", - "sections": "Test alert notification channels", - "info": "Be sure to save your alerts notification channels before testing them to make sure they're working properly.", - "category_2": "Alert notifications", - "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click" + "sections": "Import additional modules from New Relic One", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5f2dbb3664441fd3a556a97c" + "id": "5efa993c196a67066b766469" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32791, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Set proactive alerts and align teams, tools, and processes for incident response", - "Prerequisites", - "1. Define policies", - "2. Set specific alerts", - "3. Identify groups", - "4. Determine thresholds", - "5. Set notification channels", - "6. Automate resolution", - "7. Establish reviews", - "8. Fine-tune process", - "Expert tip", - "For more help" + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Set proactive alerts and align teams, tools, and processes for incident response ", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "6040cb4f86b1533eb31ac0e71e58709d77f79b50", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/proactive-baseline-alerts-devops_0.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/set-proactive-alerts-align-teams-tools-processes-incident-response", - "published_at": "2020-10-04T01:38:13Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "title": "Set up your development environment", + "type": "developer", + "tags": [ + "developer account", + "API key", + "New Relic One CLI" + ], + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Using New Relic's proactive alerting, you can spend less time firefighting and more time deploying significant changes to your product.", - "body": "The term alerting often carries some negative connotations: many developers correlate alerting with errors, mistakes, and ongoing issues. However, developers who are proactive about alerting, know they don't have to stare at dashboards all day because effective alerts tell them when to check in. Well-defined alerts help you understand the health of your systems, so you can respond to performance problems before they affect your customers. Further, a focused alerts policy helps you pinpoint any degradation that could impact performance in your application or environment. With proactive alerting, you'll decrease user-reported incidents, and your teams will spend less time firefighting and more time deploying significant changes to your product. After you define the right alerts, proper incident orchestration aligns your teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites This tutorial assumes you have: Instrumented your applications in New Relic. Reviewed the Establish objectives and baselines tutorial. Optionally added custom attributes and events. 1. Define policies Define required alerting policies based on SLOs. A service level objective (SLO) is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI). Examples of service level indicators could be average response time, response time percentile, and application availability. SLOs would then clarify a target value for those SLIs such as: Average response time should be less than 200 ms. 95% of requests should be completed within 250 ms. Availability of the service should be 99.99%. These SLOs can also be logically grouped together to provide an overall boolean indicator of whether the service is meeting expectations or not (for example, 95% of requests completed within 250 ms AND availability is 99.99%), which can be helpful for alerting purposes. Use these SLIs as key performance indicators (KPIs) so your team and organization can measure your service and ensure it's meeting customer expectations. By breaking down the quantitative performance metrics that are required of your services, you can then identify what kinds of alerts you should set for each. For instance, you could set an alert to notify you if web transaction times go above half a millisecond, or if the error rate goes higher than 0.20%. However, not every SLO needs to become an alert. A strong alerting strategy takes SLOs and creates a set of simple, actionable alerts. New Relic often finds that our most mature customers set fewer alerts in general and focus those alerts on a core set of metrics that indicate when their customer experience is truly degraded. As a result, New Relic customers often use Apdex as part of their alerting strategy to align alerts with signs of degraded user satisfaction. As you design your alerting strategy, keep this question in mind: “If the customer isn’t impacted, is it worth waking someone up?” Example questions and KPI solutions For a simple framework of areas to set alerts for, use the following questions and advised metrics and KPIs: Questions Metrics and KPIs Are we open for business? New Relic Browser and New Relic APM can be used to alert on site availability. How's our underlying infrastructure? Set KPIs for key hardware, network, and storage components. How's the health of our application? Track metrics for JVM performance, queuing, caching, and similar dependencies. How’s the overall quality of our application? Use an Apdex score to quickly access an application’s quality. How are our customers doing? Consider real end-user metrics (Browser or APM), synthetic users (Synthetics), and Apdex scores. How's our overall business doing? Focus on key transactions within an application, and tie them to expected business outcomes to illustrate correlation between your application and business performance. 2. Set specific alerts Set specific alerts for performance, correctness, throughput, availability, and dependencies With New Relic you can set alerts on your instrumented applications, end-user experience, infrastructure, databases, and more. New Relic will alert you if your site's availability dips or if your error rate spikes above acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create alert fatigue while thresholds that are too loose will lead to unhappy customers. Baseline alerts allow you to set dynamic thresholds for alerts based on historical performance. Use baselines to tune your alert to the right threshold. For example, an alert in APM can notify incident response teams if web transaction times deviate from historical performance for an allotted amount of time. alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds You can set this same kind of alert in Browser to catch sub-optimal performance. In the following example, we've set both a warning and a violation for throughput: alerts.newrelic.com > (selected alert policy) > (selected alert condition) > Define thresholds As you develop smaller, independent services running on increasingly ephemeral architectures, your environments become significantly more complex. Visibility into outliers can be an important tool for understanding likely performance issues. You should set alerts to automatically fire when you have an outlier, which can indicate misbehaving hosts, load balancers, or apps. For example, a load balancer divides web traffic across five different servers. You can set an alert based on a NRQL query and receive a notification if any server starts getting significantly more or less traffic than the other servers. Here is an example chart: And here's a sample NRQL query: SELECT average(cpuPercent) FROM SystemSample WHERE apmApplicationNames = 'MY-APP-NAME' FACET hostname Now you have set static, baseline, and outlier alerts. This can provide a comprehensive awareness of your ecosystem. Refer to the New Relic Alerts documentation for more details about optimizing your alerts. 3. Identify groups Identify groups to alert, set broadcasting methods, and assign first responders to team dashboards Alerting without the proper broadcasting methods leaves you vulnerable. Your alerting strategy should include a notification channel to ensure the appropriate teams are notified if your application or architecture encounters issues. New Relic has many notification integrations, but we recommend that you start simple and add more complexity later. We recommend that you first send alerts to a group chat channel (for example, using Slack or PagerDuty). Evaluate these alerts in real time for several weeks to understand which alerts are indicative of important or problematic issues. These are the types of alerts that warrant waking someone up. Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as pager duty). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 4. Determine thresholds Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. Make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 5. Set notification channels Ensure alerts have auditable notification channels Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 6. Automate resolution Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for common ticketing systems. You can use any of these integrations to file tickets from New Relic APM. 7. Establish reviews Establish a post mortem process After the incident has been resolved, key stakeholders and participants must capture accurate and thorough documentation of the incident. At a minimum, we recommend that the retro documentation includes: A root cause analysis A chronology and summary of remediation steps and their result, whether they were successful or not A measure of the impact to the business in terms of user experience and financial losses, if possible Recommendations for system or feature improvements to prevent a recurrence Recommendations for process and communication improvements Store post mortem reports in a highly visible, searchable repository, such as a shared drive folder or wiki. Culturally, it's essential that this process focuses on constructive learning and improvement rather than punishment or blame. Example post mortem report Here is a brief example of a post mortem report: Post mortem Comments Date March 1, 2018 Executive summary From approximately 1:45PM until 2:30PM, users could not add items to their carts, which prevented any checkouts from occurring during the incident period. Root cause We determined that a change was made to the CSS rules on the product detail page that effectively disabled the Add to cart button. Timeline 1:50PM: Successful checkouts < 10 for 5 minutes alert triggered; assigned to Alice. 1:55PM: After reviewing the ecommerce team dashboard, Alice determined that the threshold was breached immediately following a deploy by Bob. She notified him of the incident. 2:00PM: Alice and Bob began troubleshooting. Attempts at recreating the issue in production were successful. 2:20PM: Bob determined that his change to the CSS on the product detail page disabled the Add to cart button. He deployed a hotfix. 2:30PM: Functionality was restored and the incident was resolved. Impact No checkouts were completed during the duration of the incident. Our typical revenue for a Thursday during this timeframe is $30,000. Recommendations We have been discussing implementing New Relic Synthetics for awhile now. If we had a Synthetic check on the checkout process, this issue would have been detected immediately. We should also implement more thorough unit tests in the front-end web app. 8. Fine-tune process Fine-tune alerts and thresholds As you use New Relic to optimize your application and infrastructure performance, tighten your New Relic Alerts policy conditions to keep pace with your improved performance. When rolling out new code or modifications that could negatively impact performance over a period of time, loosen your threshold conditions to allow for these short-term changes. For instance, we recommend using pre-established baselines and thresholds to increase efficiency during high-impact times for your business, such as annual events and major releases. Fine-tuning gives you the flexibility you need to increase efficiencies and extend your notification channels. As noted earlier, we recommend you start with a group chat service when you first establish notifications. Once you've identified other tools you'd like to integrate with, set up a notification channel to maintain your momentum. Tools such as xMatters and PagerDuty provide popular integrations, but don't overlook simple methods, such as webhooks. The goal is to continuously improve your alerting scheme. Be sure to check your alerts and confirm that they're firing regularly and are still relevant for your customer satisfaction metrics. Use the New Relic platform to create dashboards centered around alerts and incidents for the most common policy conditions and violations. insights.newrelic.com > All dashboards > (selected dashboard) Use the New Relic query language and the Insights query API to create your dashboards. For detailed instructions, check out Sending alerts data to Insights. The dashboard above was created using the following NRQL queries. It's recommended you recreate them as needed for your alerting dashboards. Incidents by condition: SELECT count(*) FROM ALERT_NAME WHERE current_state = 'open' FACET condition_name SINCE 1 week ago Incidents by policy: SELECT count(*) FROM ALERT_NAME where current_state = 'open' FACET policy_name SINCE 60 MINUTES AGO TIMESERIES Alert trends over time: SELECT count(*) FROM ALERT_NAME WHERE current_state IS NOT NULL FACET policy_name SINCE 1 week ago TIMESERIES Incident details: SELECT timestamp, incident_id, policy_name, condition_name, details, severity FROM ALERT_NAME SINCE 1 week ago LIMIT 40 Visualizing this data provides a resource you can share with others to refine the alerts and thresholds you're using. Expert tip In addition to instrumenting and measuring application and infrastructure metrics, mature DevOps organizations often measure and optimize the efficiency of incident response processes. For example, you can use webhooks to send alert events to New Relic Insights. This allows you to supplement your team dashboards with New Relic Alerts data. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 82.55217, + "_score": 282.9924, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "5. Set notification channels", - "body": " acceptable levels, as defined by your SLOs. You can set warning thresholds to monitor issues that may be approaching a critical severity but don't yet warrant a pager notification. Setting thresholds for when alerts should notify teams can be challenging. Thresholds that are too tight will create" + "tags": "New Relic One CLI", + "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" }, - "id": "5f5ac17764441ff9d5e067ec" + "id": "5efa9973e7b9d242237bab39" }, { - "category_2": "Alert notifications", - "nodeid": 6481, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Update alert notification channels", - "Reference for updating channels", - "Basic process", - "For more help" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Update alert notification channels", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "ee8bce401d0623e8b85d84a6a20bd8a72b9764ef", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/update-alert-notification-channels", - "published_at": "2020-10-04T06:46:30Z", - "updated_at": "2020-08-11T06:42:27Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert notifications", + "published_at": "2020-10-05T01:56:44Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "Read about how to update alerts notification channels. ", - "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 82.34503, + "_score": 279.2313, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Update alert notification channels", - "sections": "Update alert notification channels", - "info": "Read about how to update alerts notification channels. ", - "category_2": "Alert notifications", - "body": " to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" }, - "id": "5f2dbad928ccbcb8ca88dfed" + "id": "5f28bd6ae7b9d267996ade94" } ], "/automate-workflows/get-started-kubernetes": [ @@ -4394,7 +4151,7 @@ "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-04T02:09:04Z", + "published_at": "2020-10-05T01:53:44Z", "title": "Automate workflows", "updated_at": "2020-10-04T02:09:04Z", "type": "developer", @@ -4405,7 +4162,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 137.2037, + "_score": 127.51088, "_version": null, "_explanation": null, "sort": null, @@ -4459,7 +4216,7 @@ "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 125.44798, + "_score": 113.33452, "_version": null, "_explanation": null, "sort": null, @@ -4508,7 +4265,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.25044, + "_score": 88.10164, "_version": null, "_explanation": null, "sort": null, @@ -4557,7 +4314,7 @@ "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.917725, + "_score": 81.92566, "_version": null, "_explanation": null, "sort": null, @@ -4594,75 +4351,171 @@ "General attributes", "For more help" ], - "title": "Query and alert on usage data", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Accounts and billing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", + "title": "Query and alert on usage data", + "category_0": "New Relic accounts", + "type": "docs", + "category_1": "Accounts and billing", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "published_at": "2020-10-03T15:47:18Z", + "updated_at": "2020-10-03T15:47:18Z", + "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", + "document_type": "page", + "popularity": 1, + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 66.693756, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Query and alert on usage data", + "sections": "Query and alert on usage data", + "info": "How to create queries and alerts for your New Relic billing-related usage. ", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", + "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" + }, + "id": "5f22f5bd64441f0c9e2a48ea" + } + ], + "/build-apps/build-hello-world-app": [ + { + "sections": [ + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" + ], + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-05T01:55:26Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 193.44286, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" + }, + "id": "5efa989e28ccbc4071307de5" + }, + { + "sections": [ + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" + ], + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "published_at": "2020-10-03T15:47:18Z", - "updated_at": "2020-10-03T15:47:18Z", - "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 73.2136, + "_score": 180.80276, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and alert on usage data", - "sections": "Query and alert on usage data", - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "file structure", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5f22f5bd64441f0c9e2a48ea" - } - ], - "/build-apps/add-nerdgraphquery-guide": [ + "id": "5efa989e196a671300766404" + }, { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", + "published_at": "2020-10-05T01:56:44Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 770.3739, + "_score": 153.23781, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ @@ -4705,7 +4558,7 @@ "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-04T02:14:58Z", + "published_at": "2020-10-05T01:53:44Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -4713,258 +4566,365 @@ "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 374.0268, + "_score": 131.00172, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Query your browser data", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + "sections": "Create and serve a new Nerdpack", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, "id": "5efa993c196a67066b766469" }, { - "category_2": "Alert conditions", - "nodeid": 9231, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" + ], + "title": "Permissions for managing applications", + "type": "developer", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" + ], + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-09-02T02:04:41Z", + "document_type": "page", + "popularity": 1, + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 103.62146, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "nerdpack manager", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + }, + "id": "5f45bf2864441ffb4dfdcdbb" + } + ], + "/explore-docs/query-and-store-data": [ + { + "sections": [ + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" + ], + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-05T01:56:44Z", + "updated_at": "2020-09-08T01:50:19Z", + "document_type": "page", + "popularity": 1, + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 136.14728, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "tags": "nerdstorage components", + "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" + }, + "id": "5efa989ee7b9d2048e7bab92" + }, + { + "category_2": "Java agent release notes", + "nodeid": 11976, + "sections": [ + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 3.36.0", + "Improvements", + "Fixes" + ], + "title": "Java Agent 3.36.0", + "category_0": "Release notes", + "type": "docs", + "category_1": "APM agent release notes", + "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", + "image": "", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", + "published_at": "2020-10-03T17:31:36Z", + "updated_at": "2018-04-14T23:39:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 46.731064, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" + }, + "id": "58a53cf38e9c0f755a81db4e" + }, + { + "category_2": "API guides", + "nodeid": 11521, + "sections": [ + "Java agent", + "Getting started", + "Installation", + "Additional installation", + "Heroku", + "Configuration", + "Attributes", + "Features", + "Instrumentation", + "Custom instrumentation", + "API guides", + "Async instrumentation", + "Troubleshooting", + "Guide to using the Java agent API", + "Use the API", + "Transactions", + "Instrument asynchronous work", + "Implement distributed tracing", + "Implement cross application tracing", + "Obtain references to New Relic entities", + "Additional API functionality", + "Additional API usage examples", "For more help" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", + "title": "Guide to using the Java agent API ", + "category_0": "APM agents", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-10-04T08:33:54Z", - "updated_at": "2020-10-04T08:33:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "category_1": "Java agent", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "published_at": "2020-10-03T17:13:08Z", + "updated_at": "2020-09-03T11:06:02Z", + "breadcrumb": "Contents / APM agents / Java agent / API guides", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 304.8992, + "_score": 32.245056, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Sum of query results (limited or intermittent data)", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5a3137f4e621f4576cf1e35f" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "category_2": "PHP agent API", + "nodeid": 11821, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", + "PHP agent", + "Getting started", + "Installation", + "Advanced installation", + "Configuration", + "API guides", + "PHP agent API", "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", + "Features", + "Frameworks and libraries", + "Troubleshooting", + "newrelic_add_custom_tracer", + "Requirements", + "Description", + "Parameters", + "Return value(s)", + "Example(s)", + "Instrument a function", + "Instrument a method within a class", + "Instrument a method within a namespaced class", "For more help" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", + "title": "newrelic_add_custom_tracer (PHP agent API)", + "category_0": "APM agents", "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-10-03T23:04:50Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", - "document_type": "page", + "category_1": "PHP agent", + "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", + "published_at": "2020-10-03T17:22:37Z", + "updated_at": "2019-09-30T22:55:59Z", + "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", + "document_type": "api_doc", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 281.49603, + "_score": 26.17691, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "sections": "Instrument a method within a class", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" }, - "id": "5f2b1349196a67379343fbcf" + "id": "58ca4191e621f45edd466e7a" }, { + "nodeid": 9691, "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" - ], - "title": "Query and store data", - "type": "developer", - "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" + "Introduction to New Relic Mobile (Unity)", + "Contents", + "Monitor mobile app performance", + "Install and configure", + "Use Unity SDK API", + "Send custom events and attributes to Insights", + "Track custom network requests", + "Uninstall plugin", + "Unity release notes", + "For more help" ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", + "title": "Introduction to New Relic Mobile (Unity)", + "type": "docs", + "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-08-01T01:42:02Z", + "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", + "published_at": "2020-10-04T04:12:22Z", + "updated_at": "2020-07-25T00:44:01Z", + "breadcrumb": "Contents", "document_type": "page", "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", + "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 270.39496, + "_score": 17.220583, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and store data", - "sections": "Components overview", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query" + "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" }, - "id": "5efa989e28ccbc2f15307deb" + "id": "5c52cbec8e9c0f0b286080ec" } ], - "/build-apps/build-hello-world-app": [ + "/explore-docs/nr1-catalog": [ { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Intro to New Relic One API components", + "title": "New Relic One CLI reference", "type": "developer", "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "New Relic One app", + "nerdpack commands" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 194.04584, + "_score": 291.41327, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa989e28ccbc535a307dd0" }, { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-05T01:45:14Z", + "title": "New Relic Developers", + "updated_at": "2020-10-05T01:41:49Z", "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.8055, + "_score": 197.79489, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "file structure", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" }, - "id": "5efa989e196a671300766404" + "id": "5d6fe49a64441f8d6100a50f" }, { "image": "", @@ -4990,7 +4950,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-04T02:15:08Z", + "published_at": "2020-10-05T01:56:44Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5001,624 +4961,540 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 154.78098, + "_score": 166.62445, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, "id": "5f28bd6ae7b9d267996ade94" }, { "sections": [ - "Map page views by region in a custom app", + "Serve, publish, and deploy your New Relic One app", "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", + "Tip", + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "Map page views by region in a custom app", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-04T02:14:58Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 133.85135, + "_score": 137.8067, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create and serve a new Nerdpack", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" }, - "id": "5efa993c196a67066b766469" + "id": "5efa999de7b9d283e67bab8f" }, { "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" ], - "title": "Permissions for managing applications", + "title": "Create a \"Hello, World!\" application", "type": "developer", "tags": [ - "nerdpack manager", - "permissions", - "managing apps" + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-04T02:16:58Z", - "updated_at": "2020-09-02T02:04:41Z", + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-08-21T01:45:19Z", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 104.41735, + "_score": 135.41148, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "nerdpack manager", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "NR One Catalog", + "body": ", you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already" }, - "id": "5f45bf2864441ffb4dfdcdbb" + "id": "5efa9973196a67d16d76645c" } ], - "/explore-docs/query-and-store-data": [ + "/explore-docs/intro-to-sdk": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Intro to NerdStorage", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" - ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-09-08T01:50:19Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 138.29794, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "nerdstorage components", - "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" - }, - "id": "5efa989ee7b9d2048e7bab92" - }, - { - "category_2": "Java agent release notes", - "nodeid": 11976, - "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 3.36.0", - "Improvements", - "Fixes" - ], - "title": "Java Agent 3.36.0", - "category_0": "Release notes", - "type": "docs", - "category_1": "APM agent release notes", - "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", - "published_at": "2020-10-03T17:31:36Z", - "updated_at": "2018-04-14T23:39:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 46.897446, + "_score": 872.8204, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "58a53cf38e9c0f755a81db4e" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "API guides", - "nodeid": 11521, "sections": [ - "Java agent", - "Getting started", - "Installation", - "Additional installation", - "Heroku", - "Configuration", - "Attributes", - "Features", - "Instrumentation", - "Custom instrumentation", - "API guides", - "Async instrumentation", - "Troubleshooting", - "Guide to using the Java agent API", - "Use the API", - "Transactions", - "Instrument asynchronous work", - "Implement distributed tracing", - "Implement cross application tracing", - "Obtain references to New Relic entities", - "Additional API functionality", - "Additional API usage examples", - "For more help" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Guide to using the Java agent API ", - "category_0": "APM agents", - "type": "docs", - "category_1": "Java agent", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", + "title": "Intro to NerdStorage", + "type": "developer", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "published_at": "2020-10-03T17:13:08Z", - "updated_at": "2020-09-03T11:06:02Z", - "breadcrumb": "Contents / APM agents / Java agent / API guides", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-05T01:56:44Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 32.570927, + "_score": 665.4148, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" }, - "id": "5a3137f4e621f4576cf1e35f" + "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "PHP agent API", - "nodeid": 11821, "sections": [ - "PHP agent", - "Getting started", - "Installation", - "Advanced installation", - "Configuration", - "API guides", - "PHP agent API", - "Attributes", - "Features", - "Frameworks and libraries", - "Troubleshooting", - "newrelic_add_custom_tracer", - "Requirements", - "Description", - "Parameters", - "Return value(s)", - "Example(s)", - "Instrument a function", - "Instrument a method within a class", - "Instrument a method within a namespaced class", - "For more help" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "title": "newrelic_add_custom_tracer (PHP agent API)", - "category_0": "APM agents", - "type": "docs", - "category_1": "PHP agent", - "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", - "published_at": "2020-10-03T17:22:37Z", - "updated_at": "2019-09-30T22:55:59Z", - "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", - "document_type": "api_doc", + "title": "Add tables to your New Relic One application", + "type": "developer", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-05T01:53:45Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", "popularity": 1, - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 26.262323, + "_score": 566.0984, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Instrument a method within a class", - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation." }, - "id": "58ca4191e621f45edd466e7a" + "id": "5efa989ee7b9d2ad567bab51" }, { - "nodeid": 9691, + "category_2": "Optimize your cloud native environment", + "nodeid": 32786, "sections": [ - "Introduction to New Relic Mobile (Unity)", - "Contents", - "Monitor mobile app performance", - "Install and configure", - "Use Unity SDK API", - "Send custom events and attributes to Insights", - "Track custom network requests", - "Uninstall plugin", - "Unity release notes", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Migrate to microservices", + "1. Deploy instrumentation on all application tiers and components", + "2. Use key metrics to identify components that you can migrate to microservices", + "3. Use deployment markers to establish app performance baselines", + "4. Implement the new microservice-based architecture, and measure the success of your application development processes", + "5. Create a dashboard to monitor KPIs", + "6. Create a new baseline to use for comparisons", "For more help" ], - "title": "Introduction to New Relic Mobile (Unity)", + "title": "Migrate to microservices ", + "category_0": "New Relic solutions", "type": "docs", - "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", - "image": "", - "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", - "published_at": "2020-10-04T04:12:22Z", - "updated_at": "2020-07-25T00:44:01Z", - "breadcrumb": "Contents", + "category_1": "New Relic solutions", + "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", + "published_at": "2020-10-04T01:38:12Z", + "updated_at": "2020-09-27T20:33:59Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 17.295717, + "_score": 559.6985, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" + "sections": "1. Deploy instrumentation on all application tiers and components", + "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" }, - "id": "5c52cbec8e9c0f0b286080ec" - } - ], - "/automate-workflows/kubernetes-helm-deployment": [ + "id": "5f58347e64441f8c45e0684c" + }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Getting started", + "nodeid": 7646, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "New Relic APM", + "Getting started", + "Guides", + "Apdex", + "Maintenance", + "Troubleshooting", + "Introduction to APM", + "Why it matters", + "Monitor all aspects of your business", + "Ready to get started?", + "What's next?", + "For more help" ], - "published_at": "2020-10-04T02:09:04Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "Introduction to APM", + "category_0": "APM", + "type": "docs", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", + "image": "", + "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", + "published_at": "2020-10-03T14:46:24Z", + "updated_at": "2020-10-03T14:46:24Z", + "breadcrumb": "Contents / APM / New Relic APM / Getting started", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "New Relic APM: an overview of its features and functionality.", + "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 6385.6387, + "_score": 550.9646, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" + "sections": "New Relic APM", + "info": "New Relic APM: an overview of its features and functionality.", + "category_1": "New Relic APM", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", + "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", + "breadcrumb": "Contents / APM / New Relic APM / Getting started" }, - "id": "5efa999c196a67dfb4766445" - }, + "id": "5f2dcb8a64441f3a1756a9e5" + } + ], + "/build-apps/permission-manage-apps": [ { - "category_2": "Enable log monitoring", - "nodeid": 34166, + "category_2": "Original users and roles", + "nodeid": 1101, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Kubernetes plugin for log forwarding", - "Requirements", - "Enable Kubernetes for logs management", - "View log data", - "What's next?", + "Original accounts and billing", + "Original product-based pricing", + "Original users and roles", + "SAML SSO (original users)", + "Original data retention", + "Original pricing plan usage", + "Users and roles (original user model)", + "View and manage users", + "User types: basic user and full user", + "Account roles", + "Add-on roles", + "Account permissions", + "Alert permissions", + "APM permissions", + "Browser permissions", + "Infrastructure permissions", + "Insights permissions", + "Mobile permissions", + "Synthetics permissions", + "Workloads", "For more help" ], - "title": "Kubernetes plugin for log forwarding", - "category_0": "Log management", + "title": "Users and roles (original user model)", + "category_0": "New Relic accounts", "type": "docs", - "category_1": "Enable log management", - "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "category_1": "Original accounts and billing", + "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", - "published_at": "2020-10-04T02:40:10Z", - "updated_at": "2020-09-27T16:17:57Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", + "published_at": "2020-10-03T17:04:51Z", + "updated_at": "2020-10-03T17:04:51Z", + "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", "document_type": "page", "popularity": 1, - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.70553, + "_score": 157.77112, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + "sections": "Account permissions", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" }, - "id": "5f37c1d064441f0d21a0a5e1" + "id": "5f3e194028ccbc18c7f56de3" }, { - "category_2": "Private locations", - "nodeid": 23821, + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", + "Amazon integrations", + "Get started", + "AWS integrations list", "Troubleshooting", - "Install containerized private minions (CPMs)", - "General private minion features", - "Kubernetes-specific features", - "System requirements and compatibility", - "Private location key", - "Sandboxing and Docker dependencies", - "Install and update CPM versions", - "Start the CPM", - "Stop or delete the CPM", - "Show help and examples", - "Show license information", - "Configure CPM", - "Networks", - "Security, sandboxing, and running as non-root", - "Docker image repository", - "Additional considerations for CPM connection", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", "For more help" ], - "title": "Install containerized private minions (CPMs)", - "category_0": "Synthetic monitoring", + "title": "Integrations and managed policies", + "category_0": "Integrations", "type": "docs", - "category_1": "Synthetic monitoring", - "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", - "published_at": "2020-10-04T00:01:41Z", - "updated_at": "2020-08-13T23:22:19Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.44296, + "_score": 108.26477, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Using monitors", - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + "title": "Integrations and managed policies", + "sections": "Option 2: Manually add permissions", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" }, - "id": "5f31d981196a678103fbd731" + "id": "5d6c1f4828ccbce6928f6fe0" }, { - "category_2": "Enable and configure", - "nodeid": 38171, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-10-04T05:20:44Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 102.76022, + "_score": 92.377144, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 2. (Infinite Tracing) Set up a trace observer", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + "title": "Build apps", + "sections": "Permissions for managing applications", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" }, - "id": "5ea0617064441ff137912311" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Cloud adoption", - "nodeid": 16176, + "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", + "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Optimize your cloud spend", - "1. Deploy the New Relic Infrastructure agent", - "2. Create dashboard charts for cloud performance", - "3. Configure the Amazon AWS integration", - "4. Set up billing budgets in AWS", - "5. Add cloud spend and budget widgets to Insights dashboard", - "6. Create dashboards for every level of your organization", - "7. Set up alerts", - "For more help" + "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "About this Learncast", + "Prerequisites", + "Virtual Training Session List" ], - "title": "Optimize your cloud spend", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "2f064e99493b6d1ee5b3684b6be93f466ec74929", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/CloudPerformanceForAppXwSpend.png?itok=ODnQ9YW4", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/plan-your-cloud-adoption/optimize-your-cloud-spend", - "published_at": "2020-10-03T21:33:08Z", - "updated_at": "2020-09-27T22:50:50Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption", - "document_type": "page", + "published_at": "2020-10-05T01:45:50Z", + "title": "Live Learncast: New Relic One Programmability", + "updated_at": "2020-07-31T01:40:49Z", + "type": "", + "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", "popularity": 1, - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "body": "Now that you are using cloud-hosted infrastructure and services, it is important to start looking very early and very closely at your cloud spend: Make sure that your assumptions about your cloud spend are playing out as expected. Quickly catch and correct any unexpected spikes in spending. Start fine-tuning the usage of your cloud-based resources. For example, if you have a set of 20 instances all running at 10% CPU, you can think about using smaller instances or consolidating more work onto those instances. This kind of thinking about your cloud spend helps you optimize and save money quickly. New Relic can help you monitor all this. From a data perspective, it is really just another metric that our platform can collect for you. As with any other metric, you can visualize, report, and alert on your cloud spend data, just like you can with any data New Relic can help you collect. Using the New Relic applied intelligence platform is a great way to help you learn about your cloud spending or about any of your performance data. 1. Deploy the New Relic Infrastructure agent Review the requirements for the New Relic Infrastructure agent and follow the documentation for instructions on installing the agent. After you install the Infrastructure agent on your hosts, you immediately have access to the broad spectrum of metrics that the agent receives automatically. Then, you can set up the cloud integration to start collecting billing information. 2. Create dashboard charts for cloud performance New Relic Dashboards is the product that you use to write powerful custom queries about your data, and then visualize the results in charts that you collect on a dashboard. You can also feed the results of your dashboard queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Include charts for various Infrastructure metrics related to performance and usage; for example: CPU Memory Disk Database You may also want to include charts that represent the application using this cloud infrastructure. In this way you can correlate the cloud infrastructure performance with that of the application. As you right-size your cloud infrastructure, you will want to monitor application performance to make sure you are achieving any targets. Here is an example of an Insights dashboard for cloud performance. Break out data by cloud performance and application metrics The following dashboard shows several charts that present key cloud infrastructure metrics and an associated application metric. Every one of these charts represents the result of a query. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/rjq7tqrswxwtte9/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Create dashboards that include both cloud infrastructure and application metrics.] insights.newrelic.com: Create dashboards that include both cloud infrastructure and application metrics. 3. Configure the Amazon AWS integration New Relic Infrastructure comes with several types of integrations, including Amazon Web Services (AWS), Microsoft Azure, and on-host integrations. This tutorial focuses on the AWS Billing integration. First, configure the integration with your AWS account, and then you can set up the AWS Billing integration. 4. Set up billing budgets in AWS The Amazon AWS Billing integration requires some additional configuration on the AWS side. Specifically, you need to go into your AWS Billing dashboard and set up Budgets. Our documentation and the blog post Show Me (Where I’m Spending) the Money! AWS Billing Comes to New Relic Insights provide walk-throughs of this process. When creating Budgets, be sure to: Fill in an application name. Decide whether you are doing cost or service-based budgeting. Decide if your budget is open-ended or has a definite ending date. 5. Add cloud spend and budget widgets to Insights dashboard New Relic Insights is the product that you use to write powerful custom queries about your data, and then visualize the results in widgets that you collect on a dashboard. You can also feed the results of your Insights queries directly into New Relic Alerts, where you can get notifications on any deviations that you specify. Here are some examples of ways to use Insights dashboards to visualize your AWS cloud spend data. Break out data by application and by AWS budget The following dashboard shows several widgets that present key information about an AWS budget vs. actual spending, with data broken out by an application AWS budget. Every one of these widgets represents the result of an Insights query, and the data in the supporting Insights tables is the data that our integration automatically receives from AWS. [Downs: Updated image based on New Relic One can be found at: https://www.dropbox.com/s/ecp5mrnkezh6hjh/Tutorial-Run-OptimizeCloudSpen... Image caption: one.newrelic.com > Dashboards: Add charts that include AWS cloud and budgets data.] [Downs: put this 'code' section below the image please. Here is the query to create the Application X Cloud Cost budget chart in this dashboard example: SELECT latest(`provider.actualAmount`) as '$ Actual', latest(`provider.forecastedAmount`) as '$ Forecast', max(`provider.limitAmount`) as '$ Limit' FROM FinanceSample WHERE provider = 'BillingBudget' AND `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' ] insights.newrelic.com: Create dashboards that include AWS cloud and budgets. 6. Create dashboards for every level of your organization Whether you are a developer, in DevOps, or an executive, having information about your cloud spend can help you optimize your cloud environment. Here are a few ways dashboards can help at each level of your organization: Dashboards for developers Understanding how much applications cost to run helps developers properly configure applications to use more efficient services. For example, could developers save cloud costs using Amazon AWS Lambda or properly sized instances instead of randomly selecting an instance? Dashboards for DevOps Monitoring application costs allows operators to catch possible overruns due to misconfigured services. For example, is the DevOps team’s auto-scaling configuration not scaling down properly? Are they spending money on instances that are not being used? Dashboards for executives An overall view of both forecasted and actual cloud spends for individual applications on a per region basis, as well as total costs, helps executives make better business decisions. Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query is a query that you write without setting hard limits on the results and instead let New Relic Applied Intelligence “machine-learn” your performance data. New Relic alerts you when you go too far outside of your baseline numbers. Configure a baseline query using the forecasted amount Configuring a baseline query using a forecasted amount is a great starting point for monitoring any cloud budget, as you grow to understand what your cloud spend will be over time. New Relic notifies you if something spikes beyond your forecasted trend. That query looks like this: SELECT latest(`provider.forecastedAmount`) FROM FinanceSample WHERE provider = 'BillingBudget' and `provider.budgetName` = 'NAME_OF_YOUR_CLOUD_BUDGET' When you create a baseline query and alert on it, you decide how restrictively Applied Intelligence should analyze your data using a simple slider and visualization based on your recent performance. The slider either increases or decreases the gray band around your budget threshold (the blue line): alerts.newrelic.com > Alert policies > (select a policy) > Alert conditions: Create alert conditions based on your NRQL queries and Insights data. This example would have resulted in zero violations based on recent data, and that is exactly what you are looking for. However, if that blue line spikes up out of the gray band, New Relic notifies you. For more detailed information about creating, managing, and using alerts, view these New Relic University tutorials: Intro to alerting Alert policies Alerting incident lifecycle Notification channels For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.69559, + "_score": 89.50451, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic solutions", - "info": "Use New Relic to keep control of your cloud spending costs, and get your teams alerted when you go over your budgets.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": " cloud spending costs, and get your teams alerted when you go over your budgets. 7. Set up alerts After you write queries on your data in Insights, you can easily use them to create alert conditions. New Relic gives you the ability to write baseline queries against your data. A baseline query", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Cloud adoption" + "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" }, - "id": "5f59fc5b196a672f27ce6a45" - } - ], - "/explore-docs/nerdpack-file-structure": [ + "id": "5dc618cbe7b9d2a0a8e4649c" + }, { "sections": [ - "Create a \"Hello, World!\" application", + "Serve, publish, and deploy your New Relic One app", "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "Create a \"Hello, World!\" application", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-04T02:06:15Z", - "updated_at": "2020-08-21T01:45:19Z", + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-05T01:58:07Z", + "updated_at": "2020-09-02T02:05:55Z", "document_type": "page", "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 415.38242, + "_score": 77.318146, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "Nerdpack file structure", - "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Add images and metadata to your apps", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" }, - "id": "5efa9973196a67d16d76645c" - }, + "id": "5efa999de7b9d283e67bab8f" + } + ], + "/explore-docs/nr1-config": [ { "sections": [ "New Relic One CLI reference", @@ -5641,7 +5517,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:58:07Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -5649,79 +5525,108 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 331.5609, + "_score": 232.95508, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Map page views by region in a custom app", + "title": "New Relic CLI Reference", "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 152.48575, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, + { + "category_2": "Troubleshooting", + "nodeid": 13726, + "sections": [ + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-04T02:14:58Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 293.8244, + "_score": 151.88081, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Import additional modules from New Relic One", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" }, - "id": "5efa993c196a67066b766469" + "id": "5e9af5ba28ccbc3d4fd94a21" }, { "image": "", @@ -5747,7 +5652,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-04T02:15:08Z", + "published_at": "2020-10-05T01:56:44Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5758,15 +5663,15 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 282.50595, + "_score": 119.493225, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, "id": "5f28bd6ae7b9d267996ade94" }, @@ -5790,7 +5695,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-04T02:07:32Z", + "published_at": "2020-10-05T01:55:27Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -5798,431 +5703,451 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 278.78787, + "_score": 112.78566, "_version": null, "_explanation": null, "sort": null, "highlight": { "tags": "New Relic One CLI", - "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, "id": "5efa9973e7b9d242237bab39" } ], - "/explore-docs/intro-to-sdk": [ + "/automate-workflows/kubernetes-helm-deployment": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add the NerdGraphQuery component to an application", - "Add, query, and mutate data using NerdStorage", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Automate common tasks", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-04T02:16:58Z", - "title": "Build apps", - "updated_at": "2020-10-04T02:16:57Z", + "published_at": "2020-10-05T01:53:44Z", + "title": "Automate workflows", + "updated_at": "2020-10-04T02:09:04Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 880.22675, + "_score": 5855.1006, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa999c196a67dfb4766445" }, { + "category_2": "Enable log monitoring", + "nodeid": 34166, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Kubernetes plugin for log forwarding", + "Requirements", + "Enable Kubernetes for logs management", + "View log data", + "What's next?", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "Kubernetes plugin for log forwarding", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", + "published_at": "2020-10-04T02:40:10Z", + "updated_at": "2020-09-27T16:17:57Z", + "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 669.2426, + "_score": 115.46748, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "sections": "New Relic Logs", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f37c1d064441f0d21a0a5e1" }, { - "category_2": "Getting started", - "nodeid": 7646, + "category_2": "Private locations", + "nodeid": 23821, "sections": [ - "New Relic APM", + "Synthetic monitoring", "Getting started", "Guides", - "Apdex", - "Maintenance", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", "Troubleshooting", - "Introduction to APM", - "Why it matters", - "Monitor all aspects of your business", - "Ready to get started?", - "What's next?", + "Install containerized private minions (CPMs)", + "General private minion features", + "Kubernetes-specific features", + "System requirements and compatibility", + "Private location key", + "Sandboxing and Docker dependencies", + "Install and update CPM versions", + "Start the CPM", + "Stop or delete the CPM", + "Show help and examples", + "Show license information", + "Configure CPM", + "Networks", + "Security, sandboxing, and running as non-root", + "Docker image repository", + "Additional considerations for CPM connection", "For more help" ], - "title": "Introduction to APM", - "category_0": "APM", + "title": "Install containerized private minions (CPMs)", + "category_0": "Synthetic monitoring", "type": "docs", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", - "image": "", - "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", - "published_at": "2020-10-03T14:46:24Z", - "updated_at": "2020-10-03T14:46:24Z", - "breadcrumb": "Contents / APM / New Relic APM / Getting started", + "category_1": "Synthetic monitoring", + "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", + "published_at": "2020-10-04T00:01:41Z", + "updated_at": "2020-08-13T23:22:19Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", "document_type": "page", "popularity": 1, - "info": "New Relic APM: an overview of its features and functionality.", - "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 594.89185, + "_score": 114.5906, "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "New Relic APM", - "info": "New Relic APM: an overview of its features and functionality.", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", - "breadcrumb": "Contents / APM / New Relic APM / Getting started" + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Using monitors", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" }, - "id": "5f2dcb8a64441f3a1756a9e5" + "id": "5f31d981196a678103fbd731" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32786, + "category_2": "Get started", + "nodeid": 27301, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Migrate to microservices", - "1. Deploy instrumentation on all application tiers and components", - "2. Use key metrics to identify components that you can migrate to microservices", - "3. Use deployment markers to establish app performance baselines", - "4. Implement the new microservice-based architecture, and measure the success of your application development processes", - "5. Create a dashboard to monitor KPIs", - "6. Create a new baseline to use for comparisons", + "Kubernetes integration", + "Get started", + "Installation", + "Understand and use data", + "Link apps and services", + "Kubernetes events", + "Logs", + "Troubleshooting", + "Introduction to the Kubernetes integration", + "Get started: Install the Kubernetes integration", + "Why it matters", + "Navigate all your Kubernetes events", + "Bring your cluster logs to New Relic", + "Check the source code", "For more help" ], - "title": "Migrate to microservices ", - "category_0": "New Relic solutions", + "title": "Introduction to the Kubernetes integration", + "category_0": "Integrations", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "b8b8cd8f4c66a7b2d0af83e118b5c43bccfbd4a4", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new_processes.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/migrate-microservices", - "published_at": "2020-10-04T01:38:12Z", - "updated_at": "2020-09-27T20:33:59Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "category_1": "Kubernetes integration", + "external_id": "4ad996d529753d173874d752239ece44c8e6d43f", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/kubernetes-integration/get-started/introduction-kubernetes-integration", + "published_at": "2020-10-05T02:06:08Z", + "updated_at": "2020-08-05T01:57:55Z", + "breadcrumb": "Contents / Integrations / Kubernetes integration / Get started", "document_type": "page", "popularity": 1, - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", + "body": "New Relic's Kubernetes integration gives you full observability into the health and performance of your environment, no matter whether you run Kubernetes on-premises or in the cloud. With our cluster explorer, you can cut through layers of complexity to see how your cluster is performing, from the heights of the control plane down to applications running on a single pod. one.newrelic.com > Kubernetes cluster explorer: The cluster explorer is our powerful, fully visual answer to the challenges associated with running Kubernetes at a large scale. You can see the power of the Kubernetes integration in the cluster explorer, where the full picture of a cluster is made available on a single screen: nodes and pods are visualized according to their health and performance, with pending and alerting nodes in the innermost circles. Predefined alert conditions help you troubleshoot issues right from the start. Clicking each node reveals its status and how each app is performing. Get started: Install the Kubernetes integration We have an automated installer to help you with many types of installations: servers, virtual machines, and unprivileged environments. It can also help you with installations in managed services or platforms, but you'll need to review a few preliminary notes before getting started. Here's what the automated installer does: Asks for the cluster name and namespace of the integration. Asks for additional setup options, such as Kube state metrics. Asks for the installation method: manifest file or Helm. Generates either the manifest or Helm chart. Read the install docs Start the installer If your New Relic account is in the EU region, access the automated installer from one.eu.newrelic.com. Why it matters Governing the complexity of Kubernetes can be challenging; there's so much going on at any given moment, with containers being created and deleted in a matter of minutes, applications crashing, and resources being consumed unexpectedly. Our integration helps you navigate Kubernetes abstractions across on-premises, cloud, and hybrid deployments. In New Relic, you can build your own charts and query all your Kubernetes data, which our integration collects by instrumenting the container orchestration layer. This gives you additional insight into nodes, namespaces, deployments, replica sets, pods, and containers. one.newrelic.com > Dashboards: Using the chart builder you can turn any query on Kubernetes data to clear visuals. With the Kubernetes integration you can also: Link your APM data to Kubernetes to measure the performance of your web and mobile applications, with metrics such as request rate, throughput, error rate, and availability. Monitor services running on Kubernetes, such as Apache, NGINX, Cassandra, and many more (see our tutorial for monitoring Redis on Kubernetes). Create new alert policies and alert conditions based on your Kubernetes data, or extend the predefined alert conditions. These features are in addition to the data New Relic already reports for containerized processes running on instrumented hosts. Navigate all your Kubernetes events The Kubernetes events integration, which is installed separately, watches for events happening in your Kubernetes clusters and sends those events to New Relic. Events data is then visualized in the cluster explorer. To set it up, check the Kubernetes events box in step 3 of our install wizard, or follow the instructions. one.newrelic.com > Kubernetes cluster explorer > Events: Browse and filter all your Kubernetes events, and dig into application logs and infrastructure data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check the source code This integration is open source software. That means you can browse its source code and send improvements, or you can create your own fork and build it. For more information, see the README. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 581.10565, + "_score": 97.52247, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "1. Deploy instrumentation on all application tiers and components", - "info": "Use microservices to optimize applications. With microservices, app developers can resolve issues faster and deliver an enhanced end-user experience.", - "category_0": "New Relic solutions", - "category_1": "New Relic solutions", - "body": ", resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment" + "sections": "Bring your cluster logs to New Relic", + "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", + "body": " data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check" }, - "id": "5f58347e64441f8c45e0684c" + "id": "5cf9564164441f8f472a9169" }, { + "category_2": "Enable and configure", + "nodeid": 38171, "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" - ], - "title": "Add tables to your New Relic One application", - "type": "developer", - "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "Distributed tracing", + "Get started", + "Enable and configure", + "Other requirements", + "UI and data", + "Trace API", + "Troubleshooting", + "Integrations: Enable distributed tracing", + "Step 1. Install the integration", + "Step 2. (Infinite Tracing) Set up a trace observer", + "Step 3. (Infinite Tracing) Configure the integration", + "Step 4. View traces", + "For more help" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-04T02:14:28Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Integrations: Enable distributed tracing", + "category_0": "Understand dependencies", + "type": "docs", + "category_1": "Distributed tracing", + "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", + "image": "", + "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", + "published_at": "2020-10-04T05:20:44Z", + "updated_at": "2020-09-30T14:39:10Z", + "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 578.30237, + "_score": 97.37776, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation." + "sections": "Step 2. (Infinite Tracing) Set up a trace observer", + "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", + "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5ea0617064441ff137912311" } ], - "/collect-data/query-data-nrql": [ + "/build-apps/add-nerdgraphquery-guide": [ { - "category_2": "Alert conditions", - "nodeid": 9231, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a time picker to your app", + "Add a table to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-10-04T08:33:54Z", - "updated_at": "2020-10-04T08:33:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "published_at": "2020-10-05T01:55:27Z", + "title": "Build apps", + "updated_at": "2020-10-05T01:55:27Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 166.13931, + "_score": 753.9162, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "NRQL alert syntax", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Get started", - "nodeid": 11431, "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Introduction to NRQL, New Relic's query language", - "What is NRQL?", - "Where can you use NRQL?", - "What data can you query with NRQL?", - "Start using NRQL", - "NRQL query examples", - "NRQL syntax", - "For more help" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Introduction to NRQL, New Relic's query language", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "published_at": "2020-10-03T15:18:02Z", - "updated_at": "2020-09-24T08:40:20Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-05T01:53:44Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.560295, + "_score": 361.3141, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Introduction to NRQL, New Relic's query language", - "sections": "What data can you query with NRQL?", - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + "title": "Map page views by region in a custom app", + "sections": "Query your browser data", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" }, - "id": "5f2abd47196a67747343fbe1" + "id": "5efa993c196a67066b766469" }, { - "category_2": "Custom events", - "nodeid": 13661, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 117.69586, + "_score": 276.99802, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Event data sources", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "sections": "Sum of query results (limited or intermittent data)", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5f2d992528ccbc489d88dfc1" }, { - "category_2": "Ingest APIs", - "nodeid": 35526, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Metric API limits and restricted attributes", - "Endpoint requirements and maximum limits", - "Rate limit violations", - "Restricted attributes", - "For more help" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "title": "Metric API limits and restricted attributes", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "title": "Query and store data", + "type": "developer", + "tags": [ + "nerdgraph query components", + "mutation components", + "static methods" + ], + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", - "published_at": "2020-10-03T22:32:05Z", - "updated_at": "2020-10-03T22:32:04Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", - "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.55293, + "_score": 264.79504, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Ingest and manage data", - "category_0": "Telemetry Data Platform", - "category_1": "Ingest and manage data", - "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "title": "Query and store data", + "sections": "Components overview", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query" }, - "id": "5f24e4ede7b9d28743c8231c" + "id": "5efa989e28ccbc2f15307deb" }, { "category_2": "NRQL query tutorials", @@ -6262,19 +6187,19 @@ "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.39712, + "_score": 263.82214, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, "id": "5f2b1349196a67379343fbcf" } @@ -6302,7 +6227,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:58:07Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6310,7 +6235,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 247.05179, + "_score": 246.72867, "_version": null, "_explanation": null, "sort": null, @@ -6363,7 +6288,7 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 171.65553, + "_score": 158.38435, "_version": null, "_explanation": null, "sort": null, @@ -6374,6 +6299,40 @@ }, "id": "5f6c67a464441f3a75eb72d3" }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 133.19662, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, { "nodeid": 37686, "sections": [ @@ -6405,7 +6364,7 @@ "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 134.03366, + "_score": 129.68701, "_version": null, "_explanation": null, "sort": null, @@ -6415,40 +6374,6 @@ }, "id": "5f6ca534196a67b08750423e" }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.87823, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, { "image": "", "url": "https://developer.newrelic.com/explore-docs/nr1-common/", @@ -6473,7 +6398,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-04T02:15:08Z", + "published_at": "2020-10-05T01:56:44Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6484,7 +6409,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.90228, + "_score": 119.715454, "_version": null, "_explanation": null, "sort": null, @@ -6497,222 +6422,257 @@ "id": "5f28bd6ae7b9d267996ade94" } ], - "/build-apps/map-pageviews-by-region": [ + "/collect-data/query-data-nrql": [ { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" ], - "published_at": "2020-10-04T01:55:57Z", - "title": "New Relic Developers", - "updated_at": "2020-10-04T01:48:35Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 9 Days : 14 Hours : 48 Minutes : 38 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 163.21913, + "_score": 151.76105, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create a custom map view", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "Create NRQL alert conditions", + "sections": "NRQL alert syntax", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5f2d992528ccbc489d88dfc1" }, { + "category_2": "Get started", + "nodeid": 11431, "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", - "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Introduction to NRQL, New Relic's query language", + "What is NRQL?", + "Where can you use NRQL?", + "What data can you query with NRQL?", + "Start using NRQL", + "NRQL query examples", + "NRQL syntax", + "For more help" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-04T02:07:32Z", - "updated_at": "2020-08-26T01:47:20Z", + "title": "Introduction to NRQL, New Relic's query language", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "published_at": "2020-10-03T15:18:02Z", + "updated_at": "2020-09-24T08:40:20Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 112.939316, + "_score": 114.136505, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" + "title": "Introduction to NRQL, New Relic's query language", + "sections": "What data can you query with NRQL?", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5f2abd47196a67747343fbe1" }, { - "nodeid": 27692, + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "AWS Lambda monitoring", - "Get started", - "Enable Lambda monitoring", - "UI and data", - "Troubleshooting", - "Enable serverless monitoring for AWS Lambda", - "How Lambda monitoring works", - "Enable procedure overview", - "Step 1. Install the newrelic-lambda-cli tool", - "CLI requirements", - "CLI installation", - "Step 2. Connect AWS to New Relic", - "Use CLI tool", - "Manual procedures", - "Step 3. Enable Lambda instrumentation", - "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", - "What's next?", - "Optional: Stream all logs to New Relic", + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "Enable serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "AWS Lambda monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "published_at": "2020-10-04T01:13:08Z", - "updated_at": "2020-10-04T01:13:08Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 102.66096, + "_score": 112.42871, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent("MyEvent", map[string]interface{}{ "zip": "zap", }) } fmt.Println("hello world!") } Build and zip your Lambda function" + "title": "Data requirements and limits for custom event data", + "sections": "Event data sources", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f6c67a464441f3a75eb72d3" + "id": "59f4354f4bb81c2ea8b80d0a" }, { + "category_2": "Ingest APIs", + "nodeid": 35526, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Metric API limits and restricted attributes", + "Endpoint requirements and maximum limits", + "Rate limit violations", + "Restricted attributes", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "Metric API limits and restricted attributes", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", + "published_at": "2020-10-03T22:32:05Z", + "updated_at": "2020-10-03T22:32:04Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", + "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.35541, + "_score": 92.43757, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "tags": "new relic one apps", - "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" + "sections": "Ingest and manage data", + "category_0": "Telemetry Data Platform", + "category_1": "Ingest and manage data", + "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f24e4ede7b9d28743c8231c" }, { - "category_2": "Additional standard features", - "nodeid": 1921, + "category_2": "NRQL query tutorials", + "nodeid": 36916, "sections": [ - "Browser monitoring", - "Getting started", - "Guides", - "Installation", - "Configuration", - "Browser agent and SPA API", - "Page load timing resources", - "Browser Pro features", - "Additional standard features", - "Performance quality", - "Troubleshooting", - "Browser Geography: Webpage performance by location", - "Contents", - "View performance data by region", - "Use page functions", - "View drill-down details", + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", "For more help" ], - "title": "Browser Geography: Webpage performance by location", - "category_0": "Browser monitoring", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", "type": "docs", - "category_1": "Browser monitoring", - "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", - "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", - "published_at": "2020-10-03T23:25:25Z", - "updated_at": "2020-08-15T09:25:45Z", - "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 91.01366, + "_score": 85.00867, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "View performance data by region", - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "561c8bbc827a6617ad000172" + "id": "5f2b1349196a67379343fbcf" } ], "/explore-docs/nr1-plugins": [ @@ -6738,7 +6698,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:58:07Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6746,7 +6706,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 235.24146, + "_score": 230.03949, "_version": null, "_explanation": null, "sort": null, @@ -6799,7 +6759,7 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 146.14874, + "_score": 133.74316, "_version": null, "_explanation": null, "sort": null, @@ -6823,7 +6783,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", + "published_at": "2020-10-05T01:56:43Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -6831,7 +6791,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.93639, + "_score": 130.6808, "_version": null, "_explanation": null, "sort": null, @@ -6868,7 +6828,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-04T02:15:08Z", + "published_at": "2020-10-05T01:56:44Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6879,7 +6839,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.958954, + "_score": 119.493225, "_version": null, "_explanation": null, "sort": null, @@ -6892,101 +6852,129 @@ "id": "5f28bd6ae7b9d267996ade94" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" ], - "published_at": "2020-10-04T02:14:29Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "title": "Quickly tag a set of resources", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-05T01:55:28Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 106.61279, + "_score": 105.513145, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "sections": "Install the New Relic CLI", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5efa999d64441fa74a5f7e2d" } ], - "/build-apps/set-up-dev-env": [ + "/build-apps/map-pageviews-by-region": [ { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" + ], + "published_at": "2020-10-05T01:45:14Z", + "title": "New Relic Developers", + "updated_at": "2020-10-05T01:41:49Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "document_type": "page", + "popularity": 1, + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 161.62622, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Create a custom map view", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + }, + "id": "5d6fe49a64441f8d6100a50f" + }, + { + "sections": [ + "Set up your development environment", + "Before you begin", + "A note on support", "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "New Relic One CLI reference", + "title": "Set up your development environment", "type": "developer", "tags": [ - "New Relic One app", - "nerdpack commands" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 235.1152, + "_score": 110.813416, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5efa9973e7b9d242237bab39" }, { "nodeid": 27692, @@ -7028,154 +7016,105 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 156.20346, + "_score": 94.81943, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 1. Install the newrelic-lambda-cli tool", - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": " region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic" + "body": " invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent("MyEvent", map[string]interface{}{ "zip": "zap", }) } fmt.Println("hello world!") } Build and zip your Lambda function" }, "id": "5f6c67a464441f3a75eb72d3" }, { "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "title": "Add tables to your New Relic One application", + "title": "Intro to NerdStorage", "type": "developer", "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" - ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-04T02:14:28Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.82881, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" - }, - "id": "5efa989ee7b9d2ad567bab51" - }, - { - "category_2": "Trace API", - "nodeid": 35381, - "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Report traces via the Trace API (New Relic format)", - "Example: Use your tool’s native sampling", - "Example: Use Infinite Tracing", - "JSON requirements and recommendations", - "Attributes", - "Required attributes", - "Highly recommended attributes", - "Reserved attributes", - "Other attributes", - "Explore more about distributed tracing:", - "For more help" + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" ], - "title": "Report traces via the Trace API (New Relic format)", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "ba16f3a71b78e24c23da821b64567398251bb217", + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-new-relic-format-traces-trace-api", - "published_at": "2020-10-03T22:14:29Z", - "updated_at": "2020-09-30T17:57:42Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-05T01:56:44Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "body": "You can send traces in the New Relic format to our Trace API without using a New Relic agent or integration. This is useful if you want to integrate with sources that emit tracing data and require a backend for trace storage. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find the most useful subset of that data. When you send us your trace data, you have two options related to sampling: Use your tool’s native sampling: This approach sends the telemetry data directly to the Trace API and assumes you are relying on your telemetry tool to sample the data before the integration passes the data to New Relic. Even though your tool may be sampling data before the New Relic integration sends it, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To send Zipkin-formatted data to the Trace API, see our Zipkin instructions. We'll look at two examples for sending your telemetry data to New Relic, as well as how to structure your data: Example: Use your tool’s native sampling Example: Use Infinite Tracing JSON requirements and recommendations Attributes Example: Use your tool’s native sampling If you are using a telemetry tool that is sampling your trace data, you can send the data directly to New Relic. The following procedure explains how to send a test payload to the Trace API using the newrelic format. For details about how to structure your data, see JSON requirements and recommendations. Get an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"name\": \"/home\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"service.name\": \"Test Service A\", \"host\": \"host456.test.com\", \"duration.ms\": 2.97, \"name\": \"/auth\", \"parent.id\": \"ABC\" } } ] } ]' 'https://trace-api.newrelic.com/trace/v1' If you're sending more than one POST, change the trace.id to a unique value. Sending the same payload or span id multiple times for the same trace.id may result in fragmented traces in the UI. If your test returned HTTP/1.1 202 Accepted, go to our UI to see a query of your test data using the span attribute service.name = Test Service A. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Example: Use Infinite Tracing Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: Step A. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and select For other integrations. Click the adjacent clipboard icon to copy and hold the endpoint to use later as YOUR_TRACE_OBSERVER_URL in Step B. Send test data to the trace observer. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. Step B. Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in Step A. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. JSON requirements and recommendations Requirements and guidelines for trace JSON using the newrelic format: Each JSON payload is an array of objects. Each object should contain a required spans key. Each object may contain an optional common key. Use this if you want share information across multiple spans in a object. Any keys on a span have precedence over the same key in the common block. The value for spans key is a list of span objects. Certain attributes are required, and must be included either in the optional common block, or in each span. Recommended and custom attributes may be optionally included in a list of key/value pairs under a key named attributes, in the optional common block and/or in each span. In the following example POST, there are two spans, both of which will have the trace.id 12345 and the custom attribute host: host123.test.com. The first span has no parent.id, so that is the root of the trace; the second span's parent.id points to the ID of the first. [ { \"common\": { \"attributes\": { \"host\": \"host123.test.com\" } }, \"spans\": [ { \"trace.id\": \"12345\", \"id\": \"abc\", \"attributes\": { \"user.email\": \"bob@newr.com\", \"service.name\": \"my-service\", \"duration.ms\": 750, \"name\": \"my-span\" } }, { \"trace.id\": \"12345\", \"id\": \"def\", \"attributes\": { \"parent.id\": \"abc\", \"service.name\": \"second-service\", \"duration.ms\": 750, \"name\": \"second-span\" } } ] } ] Attributes Review the sections below describing the attributes for the attributes block of a newrelic formatted JSON POST. Required attributes Requests without these attributes will be rejected, and an NrIntegrationError will be generated. These are the only attributes that don't belong under attributes. attribute description id string Unique identifier for this span. trace.id string Unique identifier shared by all spans within a single trace. Highly recommended attributes While not required, these attributes should be included for the best experience with your data. They are included in the attributes section. attribute default description duration.ms float none Duration of this span in milliseconds. name string none The name of this span. parent.id string none The id of the caller of this span. Value is null if this is the root span. Traces without a root span will not displayed. service.name string none The name of the entity that created this span. timestamp long Defaults to the current time in UTC timezone if not provided. The span's start time in Epoch milliseconds. Reserved attributes These attributes are currently reserved for internal New Relic usage. While they are not explicitly blocked, we recommend not using them. attribute default description entity.name string service.name This is derived from the service.name attribute. entity.type string service The entity type is assumed to be a service. entity.guid string None The entity.guid is a derived value that uniquely identifies the entity in New Relic's backend. Other attributes You can add any arbitrary attributes you want, with the exception of the restricted attributes. For example, you might want to add attributes like customer.id or user.id to help you analyze your trace data. To learn how to control how spans appear in New Relic (for example, adding errors or setting a span as a datastore span), see Decorate spans. Explore more about distributed tracing: Learn where Trace API data shows up in the UI. Learn how to decorate spans for a richer, more detailed UI experience. For example, you can have spans show up as datastore spans or display errors. Learn about general data limits, required metadata, and response validation. If you don't see your trace data, see Troubleshooting. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.33429, + "_score": 90.184296, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report traces via the Trace API (New Relic format)", - "sections": "Report traces via the Trace API (New Relic format)", - "info": "For New Relic's Trace API: how to report traces using the New Relic format. ", - "category_2": "Trace API", - "body": " an Insert API key: Go to: one.newrelic.com > account dropdown > Account settings > API keys, and select Insights API keys. If you don't have a key, create a new one by selecting Insert keys +. Insert your Insert API key into the following JSON and then send the JSON to our endpoint. curl -i -H "Content", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Trace API" + "sections": "Use NerdStorage in your apps", + "tags": "new relic one apps", + "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple" }, - "id": "5d89dc6028ccbc83ce9cb16f" + "id": "5efa989ee7b9d2048e7bab92" }, { + "category_2": "Additional standard features", + "nodeid": 1921, "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" - ], - "title": "Nerdpack file structure", - "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-04T02:12:13Z", - "updated_at": "2020-08-14T01:49:25Z", + "Browser monitoring", + "Getting started", + "Guides", + "Installation", + "Configuration", + "Browser agent and SPA API", + "Page load timing resources", + "Browser Pro features", + "Additional standard features", + "Performance quality", + "Troubleshooting", + "Browser Geography: Webpage performance by location", + "Contents", + "View performance data by region", + "Use page functions", + "View drill-down details", + "For more help" + ], + "title": "Browser Geography: Webpage performance by location", + "category_0": "Browser monitoring", + "type": "docs", + "category_1": "Browser monitoring", + "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", + "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", + "published_at": "2020-10-03T23:25:25Z", + "updated_at": "2020-08-15T09:25:45Z", + "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.526726, + "_score": 89.92387, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + "sections": "View performance data by region", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" }, - "id": "5efa989e196a671300766404" + "id": "561c8bbc827a6617ad000172" } ], - "/explore-docs/nr1-config": [ + "/build-apps/set-up-dev-env": [ { "sections": [ "New Relic One CLI reference", @@ -7198,7 +7137,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-04T02:14:29Z", + "published_at": "2020-10-05T01:58:07Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -7206,109 +7145,19 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 237.05124, + "_score": 235.12762, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", + "sections": "New Relic One CLI reference", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, "id": "5efa989e28ccbc535a307dd0" }, - { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", - "For more help" - ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", - "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", - "document_type": "page", - "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 164.00407, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" - }, - "id": "5e9af5ba28ccbc3d4fd94a21" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-04T02:13:34Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.81834, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, { "nodeid": 27692, "sections": [ @@ -7349,63 +7198,145 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.62736, + "_score": 143.21573, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "sections": "Step 1. Install the newrelic-lambda-cli tool", "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" + "body": " region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic" }, "id": "5f6c67a464441f3a75eb72d3" }, { + "sections": [ + "Get started with the New Relic CLI", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Get your application details", + "Add a simple tag to your application", + "Bonus step: Create a deployment marker", + "Next steps" + ], + "title": "Get started with the New Relic CLI", + "type": "developer", + "tags": [ + "api key", + "New Relic CLI", + "Tags", + "Entity", + "Deployment markers" + ], + "external_id": "531f2f3985bf64bb0dc92a642445887095048882", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", + "published_at": "2020-10-05T01:53:45Z", + "updated_at": "2020-08-08T01:41:47Z", + "document_type": "page", + "popularity": 1, + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 122.61062, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Get started with the New Relic CLI", + "sections": "Get started with the New Relic CLI", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "tags": "New Relic CLI", + "body": ". This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your" + }, + "id": "5efa999c196a67c4e1766461" + }, + { + "sections": [ + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" + ], + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-05T01:56:43Z", + "updated_at": "2020-08-14T01:49:25Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 121.5896, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "tags": "New Relic One CLI", + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + }, + "id": "5efa989e196a671300766404" + }, + { "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "published_at": "2020-10-04T02:15:08Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "title": "Add tables to your New Relic One application", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "tags": [ + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" + ], + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-05T01:53:45Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 120.958954, + "_score": 115.94193, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5efa989ee7b9d2ad567bab51" } ] } \ No newline at end of file From 2dfbb017cfddcf2a4fed6c0eeb326c5f12d5860e Mon Sep 17 00:00:00 2001 From: nr-opensource-bot Date: Wed, 7 Oct 2020 01:02:04 +0000 Subject: [PATCH 5/7] chore(related-content): updated related content data --- src/data/related-pages.json | 7808 +++++++++++++++++------------------ 1 file changed, 3891 insertions(+), 3917 deletions(-) diff --git a/src/data/related-pages.json b/src/data/related-pages.json index 1aabce305..c212fa753 100644 --- a/src/data/related-pages.json +++ b/src/data/related-pages.json @@ -1,220 +1,4 @@ { - "/automate-workflows/5-mins-tag-resources": [ - { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", - "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" - ], - "published_at": "2020-10-05T01:45:14Z", - "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", - "document_type": "page", - "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 179.219, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" - }, - "id": "5d6fe49a64441f8d6100a50f" - }, - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 147.7428, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" - }, - "id": "5efa999c196a67dfb4766445" - }, - { - "category_2": "Get started", - "nodeid": 11261, - "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", - "For more help" - ], - "title": "Integrations and managed policies", - "category_0": "Integrations", - "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", - "document_type": "page", - "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 105.43245, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" - }, - "id": "5d6c1f4828ccbce6928f6fe0" - }, - { - "sections": [ - "Get started with the New Relic CLI", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Get your application details", - "Add a simple tag to your application", - "Bonus step: Create a deployment marker", - "Next steps" - ], - "title": "Get started with the New Relic CLI", - "type": "developer", - "tags": [ - "api key", - "New Relic CLI", - "Tags", - "Entity", - "Deployment markers" - ], - "external_id": "531f2f3985bf64bb0dc92a642445887095048882", - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-05T01:53:45Z", - "updated_at": "2020-08-08T01:41:47Z", - "document_type": "page", - "popularity": 1, - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 99.45044, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Get started with the New Relic CLI", - "sections": "Get started with the New Relic CLI", - "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", - "tags": "New Relic CLI", - "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" - }, - "id": "5efa999c196a67c4e1766461" - }, - { - "category_2": "Troubleshooting", - "nodeid": 40351, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", - "For more help" - ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-10-03T15:59:21Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", - "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 78.68115, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" - }, - "id": "5f4c3992e7b9d2c2d203eddd" - } - ], "/build-apps/howto-use-nrone-table-components": [ { "image": "", @@ -224,7 +8,7 @@ "Usage", "Props" ], - "published_at": "2020-10-05T02:06:36Z", + "published_at": "2020-10-06T02:08:35Z", "title": "TableHeaderCell", "updated_at": "2020-08-03T04:46:36Z", "type": "developer", @@ -235,7 +19,7 @@ "body": "TableHeaderCell Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 511.11728, + "_score": 498.0695, "_version": null, "_explanation": null, "sort": null, @@ -255,7 +39,7 @@ "Usage", "Props" ], - "published_at": "2020-10-05T02:06:38Z", + "published_at": "2020-10-06T02:10:03Z", "title": "TableRow", "updated_at": "2020-08-03T04:45:42Z", "type": "developer", @@ -266,7 +50,7 @@ "body": "TableRow Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 423.41083, + "_score": 412.55695, "_version": null, "_explanation": null, "sort": null, @@ -289,30 +73,30 @@ "Set up your development environment", "Add, query, and mutate data using NerdStorage", "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", "Add a table to your app", + "Add a time picker to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:08:36Z", "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-10-06T02:08:36Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 417.17697, + "_score": 412.53253, "_version": null, "_explanation": null, "sort": null, "highlight": { "title": "Build apps", "sections": "Add the NerdGraphQuery component to an application", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add" }, "id": "5efa999d64441fc0f75f7e21" }, @@ -357,7 +141,7 @@ "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-05T01:53:44Z", + "published_at": "2020-10-06T02:08:36Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -365,7 +149,7 @@ "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 284.56732, + "_score": 278.83386, "_version": null, "_explanation": null, "sort": null, @@ -411,7 +195,7 @@ "body": "Cloud migrations can take many forms. Some companies choose to port their applications directly from their data center to the cloud (a “Lift and Shift” migration) while others focus on completely re-architecting their applications to take advantage of benefits available only in the cloud. No matter your approach, there are three primary questions you want to answer after your migration: Has my application gotten slower? Is my application less stable than before? Am I losing customers due to either of the previous questions? To answer these questions, start by performing some basic testing to establish a baseline for the performance and availability of your systems. A baseline is a measurement of the current performance and availability of your application, which you then use as a comparison after your migration to validate your business case. In some cases, you may change a baseline when you perform migration acceptance testing. You can also use a baseline as a comparison point during your migration to make sure that you are on track. 1. Identify components Before you begin a cloud migration, identify all the tiers of your entire application stack. List all of the components (applications, services, etc.) that you want to migrate. Segment the application stack as follows: Application (backend/microservices/cron jobs) Dependency services, such as the message queue Database Website Underlying server and infrastructure Make sure that you have access to applications and instances before you start creating application baselines. Engage your application owners, DevOps engineers, and product managers for access. Example: List of components Here is an example of the list of components in an application stack: Component Name Owner Language Stack Accessibility (Internet, Intranet) Operating System Service 1 John Doe Java Internet RHEL 6 Service 2 Maya Wiz .NET Intranet Win2003 R2 RabbitMQ John Doe Java Intranet AIX Website Maya Wiz Classic ASP Internet Win2000 MS SQL Dave Z NA Intranet Win2003 R2 2. Determine compatibility Once you identify the applications that you want to migrate, it is time to verify which application tiers to monitor with the New Relic platform. Work with stakeholders in your organization to determine the amount of instrumentation that is possible–or allowed–within your organization. This is an important step and one that will pay off, as the more you can instrument, the better your baselines. Here are the New Relic products to use for baselining, depending on the components that you identified: New Relic APM: Monitor your web apps with New Relic APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language. New Relic Infrastructure: Monitor your hosts with New Relic Infrastructure. See Compatibility and requirements for New Relic Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. New Relic Synthetics: Monitor web frontends and APIs with New Relic Synthetics. Sometimes, you may not be able to instrument your on-premise environment with APM or Infrastructure. For example, maybe your organization's policy forbids installing an agent behind a firewall. In these cases, if the application has a web frontend, use Synthetics, as it offers non-agent monitoring while still providing the ability to establish a baseline. Example: Components matched to New Relic products Match the components that you identified with their corresponding products: Component Name Tier Owner Language Stack Accessibility (Internet/ Intranet) Operating System New Relic Products Service 1 John Doe Java Internet RHEL 6 APM, Infrastructure, Synthetics Service 2 Maya Wiz .NET Intranet Win2003 R2 APM, Infrastructure ActiveMQ John Doe Java Intranet AIX APM, Plugin Website Maya Wiz Classic ASP Internet Win2000 Synthetics MS SQL Dave Z n/a Intranet Win2003 R2 Infrastructure, On-host Integration 3. Deploy monitoring Based on the component-product matches you made, deploy agents or monitors across your architecture: Deploy New Relic APM Install the APM agent on your application stack. The steps to install the APM agent are different based on language. Deploy New Relic Infrastructure After reviewing the requirements for New Relic Infrastructure, follow the instructions to install the Infrastructure agent on your hosts: Install for Linux Install for Windows Server Install on AWS Elastic Beanstalk Install with a configuration management tool Deploy Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations. Available integrations include Apache, MySQL, NGINX, and others. Create New Relic Synthetics monitors New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. To get started add a monitor. Make sure to verify that your website URL is accessible from the public network. You may also need to add New Relic IPs to your allow list. 4. Gather metrics After you deploy the agents and monitors, identify which metrics are the most important to your business and use these metrics to define your KPIs. Some recommendations include: Response time: Time taken to respond to a request. Throughput: Number of requests that came in through the application. Requesting queuing (Apache, IIS, NGINX): Duration of time taken for a request to reach your application. Database call duration: Duration of time taken to complete a database call. DB call counts: Number of calls made by application code to the database. Error rate: Percent of errors reported. Apdex score: An industry standard to measure user satisfaction with the response time of web applications and services. DNS setup timing: The time it takes to connect and receive data from DNS. SSL setup timing: The time it takes to establish an SSL connection. You can find some of these metrics in service maps, as well as on APM, and Browser overview pages. For more detailed information about navigating, interpreting, and using New Relic APM, check out these New Relic University’s tutorials: Overview dashboard tour Transactions dashboard Understanding Apdex 5. Set up Dashboards After you define your KPIs, it is easy to visualize them in New Relic Dashboards. Dashboards provide a single location to view all the data that New Relic products gather. Dashboards data consists of events, and each event has an event type, a timestamp, and key-value attributes. For more information about events, see Data collection and Default events for New Relic products. You can locate your KPIs and business metrics data in New Relic using the data explorer and the NRQL query language. You can also build Dashboards to track the performance of those KPIs: Example: Component performance compared against baselines Continuing the examples in this document, the following table illustrates the maturity of your application performance over a period of time based on deployment milestones. Each milestone will serve as a new baseline for your applications: Component Milestone 1 Milestone 2 Milestone N Environment Component Name Response Time SLA Apdex Response Time SLA Apdex Response On-Prem Service 1 1.5 secs 80% 70% 1.5 secs 68% 0.65 1.4 secs Cloud Service 1 0.9 secs 96.8% 95% 0.9 secs 98% 0.99 0.7 secs On-Prem Service 2 0.7 secs 73% 68% 0.7 secs 80% 0.78 0.85 secs Cloud Service 2 0.6 secs 90% 92% 0.6 secs 89% 0.90 0.5 secs After your migration, compare these baselines against your migration acceptance testing baselines. Expert tips If you find that you need data that is not captured by default instrumentation, New Relic makes it easy to capture custom data: APM custom instrumentation Browser custom data Infrastructure custom attributes Custom event data Mobile custom data Synthetics custom attributes You can also learn more about APM custom instrumentation with the New Relic University Custom data tutorial series. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 281.6892, + "_score": 270.29327, "_version": null, "_explanation": null, "sort": null, @@ -427,6 +211,40 @@ } ], "/explore-docs/newrelic-cli": [ + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 810.44543, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" + }, + "id": "5efa999c196a67dfb4766445" + }, { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -446,18 +264,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-05T01:45:14Z", + "published_at": "2020-10-06T01:57:17Z", "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 813.82495, + "_score": 809.6366, "_version": null, "_explanation": null, "sort": null, @@ -468,40 +286,6 @@ }, "id": "5d6fe49a64441f8d6100a50f" }, - { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", - "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" - ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", - "document_type": "page", - "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 756.5852, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation" - }, - "id": "5efa999c196a67dfb4766445" - }, { "category_2": "Measure DevOps success", "nodeid": 34966, @@ -533,7 +317,7 @@ "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 682.1383, + "_score": 656.48694, "_version": null, "_explanation": null, "sort": null, @@ -568,7 +352,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -576,7 +360,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 564.5376, + "_score": 553.1512, "_version": null, "_explanation": null, "sort": null, @@ -590,617 +374,488 @@ "id": "5efa989e28ccbc535a307dd0" }, { - "image": "https://developer.newrelic.com/static/AaronSoto-d72d9bb5f5e6165751e67367612525f4.jpg", - "url": "https://developer.newrelic.com/nerd-days/", - "sections": [ - "Nerd Days is a free 1-day event focused on building more perfect software", - "Register for Nerd Days 1.0", - "What’s is Nerd Days exactly…", - "Save the date & join us online", - "Additional Nerd Days Events", - "REGISTER FOR NERD DAYS | AMERICAS", - "Speaker line up", - "Aaron Soto", - "Caitlin Halla", - "David Shanker", - "Jeremy Cooper", - "Joel Worrall", - "John Vajda", - "Jon Thurman", - "Justin Eveland", - "Leon Chapman", - "Lindsy Farina", - "Talia Nassi", - "Thomas Martin", - "Alec Swanson", - "Brian Thomason", - "Chris Trombley", - "Gabe O'Brien", - "Liam Hurrell", - "Michael Caron", - "Phil Weber", - "Sebastian Remirez", - "Tracks", - "Observability", - "Cloud migration", - "Open source", - "Devops journey", - "Fundamentals", - "Nerd Days AMER Agenda", - "DevOps journey", - "Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements", - "Instrumenting your service using agents", - "New Relic CLI Wizardry", - "5 Steps to Kubernetes Observability", - "Delivering SRE as a Service", - "Building applications on New Relic One", - "Exploring your data using NRQL", - "New Relic AI", - "Going Serverless: Chipping at the monolith", - "Logging for Modern Organizations", - "Grafana and Prometheus with New Relic", - "Lunch with Lew", - "Custom Instrumentation", - "Exploring Data with NerdGraph", - "Tool Consolidation", - "Testing in Production", - "How Open Source powers the New Relic One Catalog", - "Alerts Best Practices", - "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data", - "Monitoring your Cloud Usage and Spend", - "Measuring code pipelines", - "Reducing toil with Terraform", - "True availability using Synthetics", - "How Observability-Driven Development accelerates DevOps transformations", - "AWS Modernization", - "Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks'", - "NerdStorageVault: ThirdParty Secrets", - "Closing + Swag", - "Engage with the developer community" - ], - "published_at": "2020-10-05T02:06:36Z", - "title": "New Relic Developers", - "updated_at": "2020-10-03T02:00:34Z", - "type": "developer", - "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1", - "document_type": "page", - "popularity": 1, - "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) What’s is Nerd Days exactly… A FREE developer focused live digital conference covering a broad range of topics at varying levels for all skill sets. Including: Live workshops Live coding and demos Customer examples Panel / Q&A sessions Presented by Relics, partners, Developer Champions, and customers Save the date & join us online Whether you’re new or a data nerd, there’s an interactive session for you. Choose the sessions you're interested in and add Nerd Days to your calendar. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Speaker line up Get hands on with sessions presented by the following Relics, partners, Developer Champions, and customers. Aaron Soto Sr. Partner Solutions Architect AWS Caitlin Halla Software Engineer New Relic David Shanker Director, Platform Engineering Kinect Consulting Jeremy Cooper Sr. TechOps Strategy Consultant New Relic Joel Worrall Director, Open Source and Developer Advocacy New Relic John Vajda Senior Product Manager New Relic Jon Thurman Senior Solutions Consultant New Relic Justin Eveland Software Engineer New Relic Leon Chapman Senior TechOps Strategy Consultant New Relic Lindsy Farina Senior Product Manager New Relic Talia Nassi Developer Advocate Split Software Thomas Martin Director, Site Reliability 27 Global Alec Swanson Software Engineer New Relic Brian Thomason Senior Partner Solutions Consultant New Relic Chris Trombley Senior Software Engineer New Relic Gabe O'Brien Senior Software Engineer New Relic Liam Hurrell Senior Technical Training Specialist New Relic Michael Caron Senior Technical Training Specialist New Relic Phil Weber Senior Technical Training Specialist New Relic Sebastian Remirez Lead Software Engineer New Relic Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes Observability Stijn Polfliet Delivering SRE as a Service Thomas Martin Building applications on New Relic One Joel Worrall 11:00AM PST Exploring your data using NRQL Phil Weber New Relic AI Sebastian Ramirez Going Serverless: Chipping at the monolith Nica Fee Logging for Modern Organizations Jeremy Cooper & Leon Chapman Grafana and Prometheus with New Relic Liam Hurrell & Colin MacNaughton 12:00PM PST Lunch with Lew Lew Cirne & Jemiah Sius 1:00PM PST Custom Instrumentation Michael Caron Exploring Data with NerdGraph Caitlin Halla Tool Consolidation Eric Mittelhammer Testing in Production Talia Nassi How Open Source powers the New Relic One Catalog Justin Eveland 2:00PM PST Alerts Best Practices Phil Weber The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Lindsy Farina Monitoring your Cloud Usage and Spend Measuring code pipelines Zach Leslie Reducing toil with Terraform Jon Thurman 3:00PM PST True availability using Synthetics Michael Caron How Observability-Driven Development accelerates DevOps transformations Dave Shanker AWS Modernization Aaron Soto & Brian Thomason Writing Reliably Bad Software, AKA 'How to get paid to write memory leaks' Gabe O’Brien & Alec Swanson NerdStorageVault: ThirdParty Secrets John Vajda 4:00PM PST Closing + Swag Jemiah Sius Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin", - "info": "", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 516.36414, - "_version": null, - "_explanation": null, - "sort": null, + "sections": [ + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" + ], + "title": "Quickly tag a set of resources", + "type": "developer", + "tags": [ + "tags", + "new relic CLI" + ], + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-06T02:07:11Z", + "updated_at": "2020-08-14T01:45:08Z", + "document_type": "page", + "popularity": 1, + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 494.3062, + "_version": null, + "_explanation": null, + "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic CLI Wizardry", - "body": " of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00AM PST Keynote: Jemiah Sius, Lew Cirne, and Special Guest Announcements Lew Cirne 10:00AM PST Instrumenting your service using agents Michael Caron New Relic CLI Wizardry Jon Thurman 5 Steps to Kubernetes" + "sections": "Install the New Relic CLI", + "tags": "new relic CLI", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic" }, - "id": "5f3dd5bf28ccbc2349f56e4e" + "id": "5efa999d64441fa74a5f7e2d" } ], - "/collect-data/custom-events": [ + "/build-apps/add-time-picker-guide": [ { - "category_2": "Custom events", - "nodeid": 13661, + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Add a time picker to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 93.166664, + "_score": 151.76114, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Custom events", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "Build apps", + "sections": "Add a time picker to your app", + "body": " a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Logs in context with agent APIs", - "nodeid": 36921, + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Annotate logs for logs in context using APM agent APIs", - "APM agent trace metadata and linking metadata APIs", - "Resources for correctly annotating logs", - "For more help" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Annotate logs for logs in context using APM agent APIs", - "category_0": "Log management", - "type": "docs", - "category_1": "Enable log management", - "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", - "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", - "published_at": "2020-10-03T23:04:51Z", - "updated_at": "2020-09-27T21:36:25Z", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", + "published_at": "2020-10-06T01:57:17Z", + "title": "New Relic Developers", + "updated_at": "2020-10-06T01:49:17Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 82.11586, + "_score": 151.59769, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Annotate logs for logs in context using APM agent APIs", - "sections": "Logs in context with agent APIs", - "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", - "category_2": "Logs in context with agent APIs", - "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", - "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" + "sections": "Add a time picker to your app", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5f37535c196a67c8c055e5ff" + "id": "5d6fe49a64441f8d6100a50f" }, { - "category_2": "Custom events", - "nodeid": 6256, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "APM: Report custom events", - "Data considerations", - "Record a custom event", - "Timestamps", - "Limits and restricted characters", - "Reserved words", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "APM: Report custom events", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "published_at": "2020-10-03T15:13:27Z", - "updated_at": "2020-09-24T07:10:11Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-06T02:11:40Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "New Relic APM: how to report custom events and attributes.", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 68.22344, + "_score": 115.71195, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "APM: Report custom events", - "sections": "Custom events", - "info": "New Relic APM: how to report custom events and attributes.", - "category_1": "Event data sources", - "category_2": "Custom events", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", - "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "tags": "New Relic One apps", + "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" }, - "id": "5f480a5a64441f578bfdcdb1" + "id": "5efa989e28ccbc4071307de5" }, { "sections": [ - "Collect data from any source", - "Agent APIs", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API", - "Log API" + "Add tables to your New Relic One application", + "Before you begin", + "Clone and set up the example application", + "Work with table components", + "Next steps" ], - "title": "Collect data from any source", + "title": "Add tables to your New Relic One application", "type": "developer", "tags": [ - "Agent API", - "Telemetry SDK", - "Trace API", - "Metric API", - "Event API" + "table in app", + "Table component", + "TableHeaderc omponent", + "TableHeaderCell component", + "TableRow component", + "TableRowCell component" ], - "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", - "image": "", - "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", - "published_at": "2020-10-05T01:53:45Z", - "updated_at": "2020-08-14T01:45:09Z", + "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", + "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", + "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", + "info": "Add a table to your New Relic One app.", + "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 56.08195, + "_score": 113.001335, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Agent APIs", - "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", - "tags": "Agent API", - "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" + "title": "Add tables to your New Relic One application", + "sections": "Add tables to your New Relic One application", + "info": "Add a table to your New Relic One app.", + "tags": "table in app", + "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" }, - "id": "5efa997128ccbc3c9a307dfd" + "id": "5efa989ee7b9d2ad567bab51" }, { - "category_2": "Custom events", - "nodeid": 13806, + "image": "", + "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", - "For more help" + "PlatformStateContext", + "Usage", + "Props" ], - "title": "Report custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", - "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "published_at": "2020-10-06T02:15:51Z", + "title": "PlatformStateContext", + "updated_at": "2020-08-01T01:47:08Z", + "type": "developer", + "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 55.273838, + "_score": 91.33254, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Custom events", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "PlatformStateContext", + "sections": "PlatformStateContext", + "info": "A PlatformStateContext component!", + "body": "PlatformStateContext Usage Copy Props There are no props for this component." }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5efa997128ccbccc6f307dc0" } ], - "/collect-data/collect-data-from-any-source": [ + "/terms": [ { - "category_2": "Ingest APIs", - "nodeid": 35471, + "category_2": "Product definitions", + "nodeid": 39646, "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Telemetry SDKs: Report custom telemetry data", - "Requirements and compatibility", - "Available libraries", - "Write your own Telemetry SDK or contribute to an existing one", - "Integrations built with the Telemetry SDKs", + "License information", + "General usage licenses", + "Special services licenses", + "Distributed licenses", + "Referenced policies", + "Product definitions", + "Usage plans", + "FAQ", + "New Relic One pricing: Definitions", "For more help" ], - "title": "Telemetry SDKs: Report custom telemetry data", - "category_0": "Telemetry Data Platform", + "title": "New Relic One pricing: Definitions", + "category_0": "Licenses", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "category_1": "License information", + "external_id": "097fc095ef18942f3af1845237742340e36416b8", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", - "published_at": "2020-10-03T22:04:50Z", - "updated_at": "2020-09-17T14:37:52Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-09-10T14:58:10Z", + "breadcrumb": "Contents / Licenses / License information / Product definitions", "document_type": "page", "popularity": 1, - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 155.1181, + "_score": 335.9723, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Telemetry SDKs: Report custom telemetry data", - "sections": "Telemetry SDKs: Report custom telemetry data", - "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", - "category_0": "Telemetry Data Platform", - "category_2": "Ingest APIs", - "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "info": "This document provides definitions of terminology you may see in New Relic contracts.", + "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" }, - "id": "5d89fefbe7b9d2537ed30dc1" + "id": "5f23b039196a67030b94f5c4" }, { - "category_2": "Custom events", - "nodeid": 13806, + "category_2": "Developer Edition", + "nodeid": 39641, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Report custom event data", - "Overview of reporting custom events and attributes", - "Send custom events and attributes", - "Extend data retention", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Developer Program Resources", "For more help" ], - "title": "Report custom event data", - "category_0": "Insights", + "title": "Developer Program Resources", + "category_0": "Licenses", "type": "docs", - "category_1": "Event data sources", - "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "category_1": "Product or service licenses", + "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", - "published_at": "2020-10-03T18:11:46Z", - "updated_at": "2020-07-26T05:52:23Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", + "published_at": "2020-10-03T18:21:54Z", + "updated_at": "2020-08-08T19:17:02Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", "document_type": "page", "popularity": 1, - "info": "An overview of the options for sending custom event data to New Relic. ", - "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic Developer edition policy", + "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 95.037735, + "_score": 332.0902, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Report custom event data", - "sections": "Event data sources", - "info": "An overview of the options for sending custom event data to New Relic. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" }, - "id": "5e8e7f9de7b9d2aa122cf0f6" + "id": "5f338507e7b9d2f670c9de83" }, { - "category_2": "Get started", - "nodeid": 36051, + "image": "", + "url": "https://opensource.newrelic.com/cla/", "sections": [ - "Ingest and manage data", - "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Get data into New Relic", - "New Relic-built agents and integrations", - "Agent APIs", - "Telemetry SDKs", - "APIs for sending metrics, traces, logs, and events", - "New Relic One applications", - "For more help" + "NEW RELIC, INC.", + "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", + "Definitions." ], - "title": "Get data into New Relic", - "category_0": "Telemetry Data Platform", - "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", - "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", - "published_at": "2020-10-04T03:02:05Z", - "updated_at": "2020-08-10T23:16:39Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", + "published_at": "2020-10-06T02:19:31Z", + "title": "New Relic Open Source Contributor License Agreement", + "updated_at": "2020-09-02T02:08:45Z", + "type": "opensource", + "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", "document_type": "page", "popularity": 1, - "info": "An introduction to how to get data into New Relic. ", - "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", + "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.575714, + "_score": 331.75098, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "APIs for sending metrics, traces, logs, and events", - "category_0": "Telemetry Data Platform", - "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" + "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" }, - "id": "5f24aa60196a67ede394f5f3" + "id": "5f31822264441fcbe056a984" }, { - "category_2": "Custom events", - "nodeid": 13661, + "category_2": "New Relic One", + "nodeid": 39366, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", + "Product or service licenses", + "New Relic One", + "APM", + "Browser", + "Developer Edition", + "Infrastructure", + "Insights", + "Logs", + "Mobile", + "Synthetics", + "Mobile apps", + "Plugins", + "Miscellaneous", + "Preview access for New Relic One", "For more help" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", + "title": "Preview access for New Relic One", + "category_0": "Licenses", "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "category_1": "Product or service licenses", + "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", + "published_at": "2020-10-04T06:02:04Z", + "updated_at": "2020-07-31T04:41:27Z", + "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 80.94, + "_score": 324.59906, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Additional Event API requirements", - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "category_1": "Event data sources", - "category_2": "Custom events", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5f23a0f7e7b9d29da9c82305" }, { - "category_2": "Java agent release notes", - "nodeid": 36271, + "category_2": "Data privacy", + "nodeid": 1591, "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 5.8.0", - "New features", - "New OSS SDK", - "Fixes" + "Security and Privacy", + "Data privacy", + "Compliance", + "Information security", + "Security bulletins", + "Security controls for privacy", + "Secured content", + "Analytics", + "Data transmission and firewalls", + "Hosting and data storage", + "Data access", + "HTTP parameters disabled by default", + "For more help" ], - "title": "Java Agent 5.8.0", - "category_0": "Release notes", + "title": "Security controls for privacy", + "category_0": "New Relic Security and Privacy", "type": "docs", - "category_1": "APM agent release notes", - "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", + "category_1": "Security and Privacy", + "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", - "published_at": "2020-10-03T22:39:52Z", - "updated_at": "2019-10-31T15:19:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", - "info": "", + "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", + "published_at": "2020-10-04T07:08:53Z", + "updated_at": "2020-09-24T07:44:02Z", + "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "document_type": "page", + "popularity": 1, + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 72.52545, + "_score": 306.89886, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Java Agent 5.8.0", - "sections": "APM agent release notes", - "category_1": "APM agent release notes", - "category_2": "Java agent release notes", - "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" + "sections": "Security and Privacy", + "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", + "category_0": "New Relic Security and Privacy", + "category_1": "Security and Privacy", + "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" }, - "id": "5dbafb88196a67d9b59aa23d" + "id": "5e30b8a864441f47ebd05cb0" } ], - "/explore-docs/nr1-cli": [ + "/build-apps/add-query-mutate-data-nerdstorage": [ { "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "New Relic One CLI Nerdpack commands", - "Command details", - "nr1 nerdpack:build", - "Builds a Nerdpack", - "Usage", - "Options", - "nr1 nerdpack:clone", - "Clone an existing Nerdpack", - "nr1 nerdpack:serve", - "Serve your Nerdpack locally", - "nr1 nerdpack:uuid", - "Get your Nerdpack's UUID", - "nr1 nerdpack:publish", - "Publish your Nerdpack", - "nr1 nerdpack:deploy", - "Deploy your Nerdpack to a channel", - "nr1 nerdpack:undeploy", - "Undeploy your Nerdpack", - "nr1 nerdpack:clean", - "Removes all built artifacts", - "nr1 nerdpack:validate", - "Validates artifacts inside your Nerdpack", - "nr1 nerdpack:Info", - "Shows the state of your Nerdpack in the New Relic's registry" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Add a time picker to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "published_at": "2020-10-05T01:56:44Z", - "title": "New Relic One CLI Nerdpack commands", - "updated_at": "2020-09-17T01:49:55Z", + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", "type": "developer", - "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 109.05165, + "_score": 405.4626, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI Nerdpack commands", - "sections": "New Relic One CLI Nerdpack commands", - "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", - "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" + "sections": "Add, query, and mutate data using NerdStorage", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" }, - "id": "5f28bd6a64441f9817b11a38" + "id": "5efa999d64441fc0f75f7e21" }, { "sections": [ @@ -1222,7 +877,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:13:00Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -1230,147 +885,158 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 105.54924, + "_score": 111.93463, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use NerdStorage in your apps", - "info": "Intro to NerdStorage on New Relic One", - "tags": "new relic one apps", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" + "title": "Intro to NerdStorage", + "sections": "Intro to NerdStorage", + "info": "Intro to NerdStorage on New Relic One", + "tags": "nerdstorage", + "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" }, "id": "5efa989ee7b9d2048e7bab92" }, { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Intro to New Relic One API components", + "title": "New Relic CLI Reference", "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" - ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-05T01:55:26Z", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 71.914055, + "_score": 85.81391, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa989ee7b9d2024b7bab97" }, { "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "title": "Set up your development environment", + "title": "Query and store data", "type": "developer", "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "nerdgraph query components", + "mutation components", + "static methods" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-08-26T01:47:20Z", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-06T02:14:19Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 55.75344, + "_score": 77.24018, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Prepare to build or modify apps", - "info": "Prepare to build apps and contribute to this site", - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "Query and store data", + "sections": "Query and store data", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" }, - "id": "5efa9973e7b9d242237bab39" + "id": "5efa989e28ccbc2f15307deb" }, { + "image": "", + "url": "https://developer.newrelic.com/collect-data/", "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" ], - "title": "Nerdpack file structure", + "published_at": "2020-10-06T02:07:11Z", + "title": "Collect data", + "updated_at": "2020-10-05T01:53:44Z", "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" - ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:49:25Z", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 51.513046, + "_score": 68.84849, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "title": "Collect data", + "sections": "Query data with NRQL", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" }, - "id": "5efa989e196a671300766404" + "id": "5efa997328ccbc768c307de2" } ], - "/automate-workflows/get-started-new-relic-cli": [ + "/collect-data/custom-attributes": [ + { + "image": "", + "url": "https://developer.newrelic.com/collect-data/", + "sections": [ + "Collect data", + "Guides to collect data", + "Add custom attributes", + "Create custom events", + "Collect data - any source", + "Build queries with NerdGraph", + "Query data with NRQL" + ], + "published_at": "2020-10-06T02:07:11Z", + "title": "Collect data", + "updated_at": "2020-10-05T01:53:44Z", + "type": "developer", + "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "document_type": "page", + "popularity": 1, + "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 138.39084, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Add custom attributes", + "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + }, + "id": "5efa997328ccbc768c307de2" + }, { "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", "url": "https://developer.newrelic.com/", @@ -1390,880 +1056,904 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-05T01:45:14Z", + "published_at": "2020-10-06T01:57:17Z", "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 327.34534, + "_score": 93.82844, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Add custom attributes", + "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" }, "id": "5d6fe49a64441f8d6100a50f" }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Measure DevOps success", + "nodeid": 16556, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: track experience indicators", + "Prerequisites", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Utilize data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "Customer experience improvement: track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-03T21:48:58Z", + "updated_at": "2020-09-27T21:45:56Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 285.4508, + "_score": 88.77106, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "title": "Customer experience improvement: track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", + "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" }, - "id": "5efa999c196a67dfb4766445" + "id": "5f5adb2728ccbc7152532752" }, { + "category_2": "Optimize your cloud native environment", + "nodeid": 32796, "sections": [ - "Quickly tag a set of resources", - "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", - "Tip", - "Next steps" - ], - "title": "Quickly tag a set of resources", - "type": "developer", - "tags": [ - "tags", - "new relic CLI" + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Customer experience improvement: Track experience indicators", + "1. Use custom attributes to associate performance data", + "2. Create dashboards with performance and business metrics", + "3. Share dashboards across departments", + "4. Use data to separate performance by cohort and debug issues at the customer level", + "For more help" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-05T01:55:28Z", - "updated_at": "2020-08-14T01:45:08Z", + "title": "Customer experience improvement: Track experience indicators", + "category_0": "New Relic solutions", + "type": "docs", + "category_1": "New Relic solutions", + "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", + "published_at": "2020-10-04T01:39:59Z", + "updated_at": "2020-09-27T20:35:02Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 178.71475, + "_score": 88.63859, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Quickly tag a set of resources", - "sections": "Install the New Relic CLI", - "info": "Add tags to applications you instrument for easier filtering and organization.", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "title": "Customer experience improvement: Track experience indicators", + "sections": "1. Use custom attributes to associate performance data", + "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", + "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5f5ac17528ccbce4f0532733" }, { - "category_2": "Troubleshooting", - "nodeid": 40351, + "category_2": "Browser agent release notes", + "nodeid": 40791, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Tag information not showing up for entity in Infra alert condition", - "Problem", - "Solution", - "Cause", - "For more help" + "Browser agent release notes", + "Browser Agent v1184", + "Release Dates", + "New Features", + "Added support for custom attributes on PageViewTiming events", + "Issue Resolutions", + "How to upgrade your agent" ], - "title": "Tag information not showing up for entity in Infra alert condition", - "category_0": "Alerts and Applied Intelligence", + "title": "Browser Agent v1184", + "category_0": "Release notes", "type": "docs", - "category_1": "New Relic Alerts", - "external_id": "317352e48f3bfaa49f0ddc1040bdf5dbf9b80670", + "category_1": "Browser agent release notes", + "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/troubleshooting/tag-information-not-showing-entity-infra-alert-condition", - "published_at": "2020-10-03T15:59:21Z", - "updated_at": "2020-09-30T09:38:17Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting", - "document_type": "troubleshooting_doc", - "popularity": 1, - "info": "Tags from events not indexed by New Relic do not appear.", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events that are indexed by New Relic. The easiest way to know whether an event is indexed is to run the query SELECT nr.entityType FROM ${EventSampleName}, replacing ${EventSampleName} with the name of the event in question. If there are values in the column nr.entity Type of the result, then the event is indexed. Otherwise it is not. Cause It is not possible to add a description to any sample that does not get indexed in New Relic. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", + "published_at": "2020-10-03T14:39:21Z", + "updated_at": "2020-10-02T05:37:45Z", + "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.35783, + "_score": 78.295456, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Tag information not showing up for entity in Infra alert condition", - "sections": "New Relic Alerts", - "info": "Tags from events not indexed by New Relic do not appear.", - "category_1": "New Relic Alerts", - "body": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting Tag information not showing up for entity in Infra alert condition Problem Custom violation description tags are not being replaced by the values from the event. Solution Tags are only available for events", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Troubleshooting" + "sections": "Added support for custom attributes on PageViewTiming events", + "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" }, - "id": "5f4c3992e7b9d2c2d203eddd" - }, + "id": "5f76bca928ccbcaa75337d9b" + } + ], + "/automate-workflows/automated-tagging": [ { - "category_2": "Alerts release notes", - "nodeid": 40771, + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "Component: Violation Tags", - "Update:" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" ], - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_0": "Release notes", - "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "a298fdb1da8f5f032a0655ecb9b91fdb418a25c8", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-25-2020-entity-tags-violations-cloud-integrations", - "published_at": "2020-10-03T19:08:20Z", - "updated_at": "2020-09-29T16:10:16Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding \"facet entity.guid\" to your NRQL query APM Conditions Synthetic Conditions Infrastructure : Cloud Integrations Infrastructure On-Host Integrations: only for the following types: HOST KafkaBroker KafkaTopic OracleDbInstance MssqlInstance ElasticsearchNode RabbitMqCluster RabbitMqExchange RabbitMqQueue RabbitMqNode KubernetesCluster AwsEcsCluster VarnishInstance MemcachedInstance CouchbaseBucket CouchbaseNode CouchbaseCluster CouchbaseQueryEngine PostgreSQLInstance F5System F5VirtualServer F5PoolMember F5Pool F5Node ConsulAgent CassandraNode RedisInstance ApacheServer NGINXServer MySQLNode VSphereHost VSphereVm VSphereResourcePool VSphereDatastore VSphereCluster VSphereDatacenter WindowsService", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.771, + "_score": 211.68188, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "sections": "09-25-2020 : Entity Tags on Violations for Cloud Integrations", - "category_1": "New Relic Platform release notes", - "body": "[RSS] Released on:  September 25, 2020 Component: Violation Tags Update: We are now adding entity tag data to the violations from cloud integrations. We are now enriching violations with entity tags for the following alert conditions and entity types NRQL Conditions - ONLY when adding "facet", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes" + "title": "Automate workflows", + "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", + "body": " markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5f735c6928ccbc5f5d337dbb" - } - ], - "/explore-docs/nerdstorage": [ + "id": "5efa999c196a67dfb4766445" + }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "UI and data", + "nodeid": 34316, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Use New Relic One", + "Get started", + "Core concepts", + "UI and data", + "Workloads", + "Build on New Relic One", + "Entity explorer: View performance across apps, services, hosts", + "View entities", + "Health (alert) status", + "Filter by tag or entity name", + "Entity data retention", + "For more help" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Entity explorer: View performance across apps, services, hosts", + "category_0": "New Relic One", + "type": "docs", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "external_id": "70c4dd2b7c228d80145ed4e4c120412a652346d8", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-entity-explorer.png", + "url": "https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "published_at": "2020-10-06T04:58:32Z", + "updated_at": "2020-10-06T04:58:32Z", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "body": "Use the entity explorer to access the performance data from all your monitored applications, services, and hosts. For more about entities, see What is an entity? View entities To use the entity explorer: Go to one.newrelic.com and select Entity explorer. Your monitored entities are on the left. You may need to scroll your list of entities to see them all. one.newrelic.com > Entity explorer: Use the entity explorer to locate and examine the entities you monitor. The entity explorer brings together data reported from across all of New Relic. Entity categories include: Services: APM-monitored applications and services monitored. Hosts: your monitored infrastructure (your servers and hosts). Mobile applications: your mobile apps. Browser applications: your front-end browser apps. Integration-reported data: data from services monitored by our integrations, including our on-host integrations (like Kubernetes, StatsD, and NGINX), and cloud platform integrations, like Amazon, Microsoft Azure, and Google Cloud Platform (GCP). Health (alert) status The entity explorer shows a color-coded alert status for entities. For example, you may see a red alert status indicating a critical violation in progress. To see what an alert status means, mouse over it. To see details about an entity's alerting status, select the entity. NRQL alert conditions aren't used to determine alert status because they aren't associated with specific entities. Starting June 8, 2020, New Relic One will not continue to display any APM application that hasn't reported data for 93 days. To match our published APM data retention guidelines, applications that have not reported data will be available within the New Relic UI for 90 days. After 90 days, those applications will be removed from the UI; however, key metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags at the top of the page. For example, you may want to filter down to only entities tagged with production, or only entities with a specific AWS region tag. For more about tags, see Tagging. Filter by entity name: Use Search services by name at the top of the page. Entity data retention Availability of data depends on these factors: Scope Data retention Entity explorer and search In the UI, data is available for eight days after an entity no longer exists, with one exception: data reported by integrations, such as Amazon AWS, is only available for one day after an entity ceases to exist. Our database (accessible via NRQL query) For querying our database (for example, via the query builder or data explorer), availability is dependent on the data retention for that data type. As a result of these factors, a short-lived entity (like a cloud host) may not be available in the entity explorer list or via search, but its data may still be available via NRQL query. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 422.9979, + "_score": 103.76931, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add, query, and mutate data using NerdStorage", - "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" + "sections": "Filter by tag or entity name", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "body": " at the top of the page. For example, you may want to filter down to only entities tagged with production, or only entities with a specific AWS region tag. For more about tags, see Tagging. Filter by entity name: Use Search services by name at the top of the page. Entity data retention Availability of data" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5d244a5864441fe577a72a1b" }, { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Add, query, and mutate data using NerdStorage", - "Before you begin", - "Get started", - "Add data to NerdStorage", - "Query data from NerdStorage", - "Mutate data in NerdStorage", - "Delete collection from NerdStorage", - "Next steps" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Add, query, and mutate data using NerdStorage", + "published_at": "2020-10-06T01:57:17Z", + "title": "New Relic Developers", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", - "tags": [ - "add data", - "query data", - "mutate data", - "nerdstorage" - ], - "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", - "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", - "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-08-30T01:49:16Z", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 266.74927, + "_score": 100.29695, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add, query, and mutate data using NerdStorage", - "sections": "Add, query, and mutate data using NerdStorage", - "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", - "tags": "nerdstorage", - "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" + "sections": "Automate common tasks", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa98d4e7b9d26d6b7bab74" + "id": "5d6fe49a64441f8d6100a50f" }, { + "category_2": "Examples", + "nodeid": 34236, "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" - ], - "title": "Intro to New Relic One API components", - "type": "developer", - "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "NerdGraph", + "Get started", + "Examples", + "NerdGraph tagging API tutorial", + "Read tags for an entity", + "Add tags for an entity", + "Remove a tag from an entity", + "Delete specific tag values for an entity", + "Replace all tag values for an entity", + "For more help" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", + "title": "NerdGraph tagging API tutorial", + "category_0": "APIs", + "type": "docs", + "category_1": "NerdGraph", + "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-05T01:55:26Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", + "published_at": "2020-10-04T02:41:20Z", + "updated_at": "2020-07-26T05:41:24Z", + "breadcrumb": "Contents / APIs / NerdGraph / Examples", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 198.26744, + "_score": 86.14833, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" + "title": "NerdGraph tagging API tutorial", + "sections": "NerdGraph tagging API tutorial", + "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", + "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5d8024fc28ccbcc5e9499cf1" }, { + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Amazon integrations", + "Get started", + "AWS integrations list", + "Troubleshooting", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "Integrations and managed policies", + "category_0": "Integrations", + "type": "docs", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 179.39986, + "_score": 82.9672, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI Reference", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" }, - "id": "5efa989ee7b9d2024b7bab97" - }, + "id": "5d6c1f4828ccbce6928f6fe0" + } + ], + "/build-apps/publish-deploy": [ { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Add a time picker to your app", + "Create a custom map view", + "Publish and deploy apps" ], - "title": "New Relic One CLI reference", + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" - ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-09-17T01:51:10Z", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.02466, + "_score": 166.89432, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" + "title": "Build apps", + "sections": "Publish and deploy apps", + "body": " a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" }, - "id": "5efa989e28ccbc535a307dd0" - } - ], - "/explore-docs/nr1-nerdpack": [ + "id": "5efa999d64441fc0f75f7e21" + }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", "sections": [ - "New Relic One CLI subscription commands", - "Command details", - "nr1 subscription:set", - "Subscribe to a Nerdpack", - "Usage", - "Options", - "Aliases", - "nr1 subscription:list", - "See your subscription", - "nr1 subscription:unset", - "Unsubscribe from a Nerdpack" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "published_at": "2020-10-05T01:58:07Z", - "title": "New Relic One CLI subscription commands", - "updated_at": "2020-08-06T01:44:54Z", + "title": "Permissions for managing applications", "type": "developer", - "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "tags": [ + "nerdpack manager", + "permissions", + "managing apps" + ], + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-06T02:08:35Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 769.92395, + "_score": 58.36326, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI subscription commands", - "sections": "New Relic One CLI subscription commands", - "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", - "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "managing apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5f2b6096e7b9d225ebc9de6f" + "id": "5f45bf2864441ffb4dfdcdbb" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "category_2": "Hosting services", + "nodeid": 13151, "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" + "Node.js agent", + "Getting started", + "Installation and configuration", + "Supported features", + "Attributes", + "API guides", + "Hosting services", + "Troubleshooting", + "Install New Relic Node.js agent in GAE flexible environment", + "Use native deploy", + "Build a custom runtime", + "Optional: Disable health checks", + "Get New Relic agent troubleshooting logs from GAE", + "For more help" ], - "published_at": "2020-10-05T01:56:44Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "title": "Install New Relic Node.js agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Node.js agent", + "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:40:01Z", + "updated_at": "2020-08-18T06:29:37Z", + "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 542.0252, + "_score": 31.004757, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + "sections": "Use native deploy", + "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", + "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5972fea707552313d3f9ba8d" }, { + "category_2": "Hosting services", + "nodeid": 13866, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Python agent", + "Getting started", + "Installation", + "Configuration", + "Supported features", + "Back-end services", + "Custom instrumentation", + "API guides", + "Python agent API", + "Web frameworks and servers", + "Hosting services", + "Attributes", + "Troubleshooting", + "Install the Python agent in GAE flexible environment", + "Deploy using GAE's native support", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Install the Python agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Python agent", + "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", + "published_at": "2020-10-03T15:11:18Z", + "updated_at": "2020-08-30T17:24:26Z", + "breadcrumb": "Contents / APM agents / Python agent / Hosting services", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 283.66217, + "_score": 20.9462, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI Commands", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" + "sections": "Deploy using GAE's native support", + "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", + "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f3fb624196a672fda1cd4a3" }, { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", + "category_2": "Installation", + "nodeid": 13121, "sections": [ - "New Relic One CLI catalog commands", - "Command details", - "nr1 catalog:info", - "Get catalog details", - "Usage", - "Options", - "nr1 catalog:submit", - "Send info to the catalog" + "Go agent", + "Get started", + "Installation", + "Configuration", + "Instrumentation", + "API guides", + "Features", + "Troubleshooting", + "Install the Go agent in GAE flexible environment", + "Build a custom runtime using Docker", + "Recommendation: Disable health checks", + "Get agent troubleshooting logs from GAE", + "For more help" ], - "published_at": "2020-10-05T02:04:57Z", - "title": "New Relic One CLI catalog commands", - "updated_at": "2020-08-14T01:49:24Z", - "type": "developer", - "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", + "title": "Install the Go agent in GAE flexible environment", + "category_0": "APM agents", + "type": "docs", + "category_1": "Go agent", + "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", + "published_at": "2020-10-03T17:53:58Z", + "updated_at": "2020-08-15T09:48:00Z", + "breadcrumb": "Contents / APM agents / Go agent / Installation", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 155.27676, + "_score": 19.50332, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI catalog commands", - "sections": "New Relic One CLI catalog commands", - "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", - "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" + "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", + "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" }, - "id": "5f28bd6a64441f805eb11a26" - }, + "id": "5f37af50196a67d8f955e63e" + } + ], + "/collect-data/custom-events": [ { + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" - ], - "title": "Nerdpack file structure", - "type": "developer", - "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", + "For more help" ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:49:25Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.77098, + "_score": 90.261734, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "New Relic One CLI", - "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" + "title": "Data requirements and limits for custom event data", + "sections": "Custom events", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989e196a671300766404" - } - ], - "/build-apps/add-query-mutate-data-nerdstorage": [ + "id": "59f4354f4bb81c2ea8b80d0a" + }, { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "category_2": "Logs in context with agent APIs", + "nodeid": 36921, "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Annotate logs for logs in context using APM agent APIs", + "APM agent trace metadata and linking metadata APIs", + "Resources for correctly annotating logs", + "For more help" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", - "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "title": "Annotate logs for logs in context using APM agent APIs", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "9d737d9f02561f18b47103b62ce11ada3dfae106", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-agent-apis/annotate-logs-logs-context-using-apm-agent-apis", + "published_at": "2020-10-03T23:04:51Z", + "updated_at": "2020-09-27T21:36:25Z", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "body": "If you use log management and APM, you can configure logs in context to correlate log data with other New Relic features. If you use a logging framework not covered by our existing logs in context solutions, we provide a way for you to configure your logging libraries to achieve annotated logs necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata and linking metadata. For tips on using these, see Resources for correct annotation. APM agent APIs: Go agent APIs: GetTraceMetadata GetLinkingMetadata Java agent APIs: getTraceMetadata getLinkingMetadata .NET agent APIs: TraceMetadata GetLinkingMetadata Node.js agent APIs: getTraceMetadata getLinkingMetadata PHP agent APIs: GetTraceMetadata GetLinkingMetadata Python agent API: get_linking_metadata Ruby agent APIs: linking_metadata current_trace_id current_span_id Resources for correctly annotating logs For more information on using the trace metadata and linking metadata APIs to annotate logs for logs in context, see the following resources: Review the APM agent specifications for getting properly formatted annotated logs for logs in context functionality, which include the required fields and properly formatted output. View the source code for our own logs in context extensions to see how we use these APIs: Go: Logrus extension Java: Log4j2 extension .NET: Serilog extension Node.js: Winston extension Python: see Python agent logging configuration PHP: Monolog extension Ruby: Logging extension For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 409.99847, + "_score": 79.09163, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add, query, and mutate data using NerdStorage", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + "title": "Annotate logs for logs in context using APM agent APIs", + "sections": "Logs in context with agent APIs", + "info": "New Relic's log management: How to use APM agent APIs to manually set up your own logs in context solution. ", + "category_2": "Logs in context with agent APIs", + "body": " necessary for logs in context. APM agent trace metadata and linking metadata APIs To get properly annotated logs for logs in context, use APM agent API calls (listed below). These APIs pass metadata required for linking log data to other New Relic data. This metadata is referred to as trace metadata", + "breadcrumb": "Contents / Log management / Enable log management / Logs in context with agent APIs" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f37535c196a67c8c055e5ff" }, { + "category_2": "Custom events", + "nodeid": 6256, "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" - ], - "title": "Intro to NerdStorage", - "type": "developer", - "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "Event data sources", + "Default events", + "Custom events", + "APM: Report custom events", + "Data considerations", + "Record a custom event", + "Timestamps", + "Limits and restricted characters", + "Reserved words", + "For more help" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "title": "APM: Report custom events", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "external_id": "0c3f09d0d0e04ad50bedcdf7088eed7c171001d8", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-05T01:56:44Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "published_at": "2020-10-06T02:40:15Z", + "updated_at": "2020-09-24T07:10:11Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", + "info": "New Relic APM: how to report custom events and attributes.", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high security mode. Data considerations The New Relic agents sends event data to New Relic as part of its normal harvest cycle every 5 seconds for agent versions supporting real time streaming. Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB in size will not be recorded, regardless of the custom event limit. For more information, check out New Relic University’s tutorial Adding custom data with the APM agent API. Or, go directly to the full online course Custom data with APM. Record a custom event To record a custom event, follow the procedure for your New Relic language agent: C SDK To add a custom event to apps monitored by the C SDK, start a transaction and use the newrelic_create_custom_event and newrelic_record_custom_event functions. For more information, see the Guide to using the C SDK API. Go To add a custom event to apps monitored by the Go agent, use RecordCustomEvent. Java Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, call recordCustomEvent. For example: Map eventAttributes = new HashMap(); NewRelic.getAgent().getInsights().recordCustomEvent(\"MyCustomEvent\", eventAttributes); The first argument defines the name of your event type, and the second argument is a map with the attributes for your custom event. Event attributes must be strings or numbers. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Java agent via a configuration parameter in newrelic.yml. Specify the maximum number of events to record per minute as an integer. For example, if you want to send less than the default of 10000 events: custom_insights_events: max_samples_stored: 5000 To disable custom events entirely, add the following to your newrelic.yml:​ custom_insights_events: enabled: false For Java agent versions prior to 4.1.0, use the following YAML configuration: custom_insights_events.enabled: true custom_insights_events.max_samples_stored: 5000 .NET Custom event collection is enabled by default in .NET agent version 4.6.29.0 or higher. To send custom events, simply call RecordCustomEvent(). For example: var eventAttributes = new Dictionary(); NewRelic.Api.Agent.NewRelic.RecordCustomEvent('MyCustomEvent', eventAttributes); The first argument defines the name of your event type, and the second argument is an IEnumerable with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can turn off custom events entirely by setting customEvents.enabled to false in newrelic.config. Node.js Custom event collection is enabled by default in Node.js agent version 1.15.0 or higher. To send custom events, simply call the relevant API. For example: recordCustomEvent(eventType, attributes) Use recordCustomEvent to record an event-based metric, usually associated with a particular duration. The eventType must be an alphanumeric string less than 255 characters. The attributes must be an object of key and value pairs. The keys must be shorter than 255 characters, and the values must be string, number, or boolean. For restrictions on event type names, see Limits and restricted characters and Reserved words. To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.js. PHP Custom event collection is enabled by default in PHP agent version 4.18 or higher. To send custom events, simply call the relevant API function. For example: newrelic_record_custom_event(\"WidgetSale\", array(\"color\"=>\"red\", \"weight\"=>12.5)); The first argument defines the name of your event type, and the second argument is an array with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. By default, the maximum number of custom events recorded per minute is 10,000. This setting cannot be changed. To disable custom events entirely, add newrelic.custom_insights_events.enabled = false to your newrelic.ini and restart the agent. Python Custom event collection is enabled by default in Python agent version 2.60.0.46 or higher. To send custom events, simply call the relevant API. For example: newrelic.agent. record_custom_event (event_type, params, application=None) The event_type defines the name (or type) of the custom event. Attributes of the custom event should be passed in as a dictionary via the params keyword argument. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For limits and restrictions on event_type and params, see Limits and restricted characters and Reserved words If called outside of the context of a monitored web request or background task, the call will be ignored unless the application keyword argument is provided and an application object corresponding to the application against which the exception should be recorded is provided. A suitable application object can be obtained using the newrelic.agent.application() function. To disable custom events entirely, set custom_insights_events.enabled to False in your newrelic.ini configuration file. Ruby Custom event collection is enabled by default in Ruby agent version 3.9.8.273 or higher. To send custom events, simply call the relevant API. For example: ::NewRelic::Agent.record_custom_event('WidgetSale', color: 'red', weight: 12.5) The first argument defines the name of your event type, and the second argument is a hash with the attributes for your custom event. Ensure you limit the number of unique event type names that you create, and do not generate these names dynamically. For restrictions on event type names, see Limits and restricted characters and Reserved words. You can change the maximum number of events recorded by the Ruby agent via a configuration parameter in newrelic.yml: Add custom_insights_events.max_samples_stored: to your configuration file. Specify the maximum number of events to record per minute as an integer. For example, if you want to be able to send up to 5000 events per minute, add: custom_insights_events.max_samples_stored: 5000 To disable custom events entirely, add custom_insights_events.enabled: false to newrelic.yml. Timestamps You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API. Limits and restricted characters See Custom event data requirements for size limits, data types, and naming syntax requirements. Reserved words Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.0336, + "_score": 66.76253, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to NerdStorage", - "sections": "Intro to NerdStorage", - "info": "Intro to NerdStorage on New Relic One", - "tags": "nerdstorage", - "body": " document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing" + "title": "APM: Report custom events", + "sections": "Custom events", + "info": "New Relic APM: how to report custom events and attributes.", + "category_1": "Event data sources", + "category_2": "Custom events", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/event-data-sources/custom-events/apm-report-custom-events", + "body": "If you have APM, you can report custom event data, which is then available for querying in New Relic. Related documentation: Add custom attributes to existing events Send custom events using the Event API (without need for APM) Custom events sent with the agent APIs are not compatible with high", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989ee7b9d2048e7bab92" + "id": "5f480a5a64441f578bfdcdb1" }, { + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:47:12Z", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 87.69675, + "_score": 55.143776, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "title": "Report custom event data", + "sections": "Custom events", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" + "Collect data from any source", + "Agent APIs", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API", + "Log API" ], - "title": "Query and store data", + "title": "Collect data from any source", "type": "developer", "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" + "Agent API", + "Telemetry SDK", + "Trace API", + "Metric API", + "Event API" ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-01T01:42:02Z", - "document_type": "page", - "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 78.478065, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Query and store data", - "sections": "Query and store data", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": ", EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category" - }, - "id": "5efa989e28ccbc2f15307deb" - }, - { + "external_id": "5bfb043fffe42ea4a78d5a90bf8e92aa8b8f8c33", "image": "", - "url": "https://developer.newrelic.com/collect-data/", - "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Collect data - any source", - "Build queries with NerdGraph", - "Query data with NRQL" - ], - "published_at": "2020-10-05T01:53:45Z", - "title": "Collect data", - "updated_at": "2020-10-05T01:53:44Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "url": "https://developer.newrelic.com/collect-data/collect-data-from-any-source/", + "published_at": "2020-10-06T02:07:11Z", + "updated_at": "2020-08-14T01:45:09Z", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "body": "Collect data from any source 15 min New Relic products report a lot of data “out of the box.” When you use products like APM, Browser, Mobile, Infrastructure monitoring, or an integration, by default you receive performance data. But you may want to bring data into New Relic that isn't collected by default. Maybe you want an API-based solution that doesn't require install of an agent. Maybe you want to bring telemetry data from another analysis service into New Relic. This page describes several ways to get data into New Relic. Step 1 of 6 Agent APIs If you use our APM, Browser, or Mobile agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language wrappers for our Trace API and Metric API (and eventually our Log API and Event API). These SDKs let you easily send metrics and trace data to New Relic without needing to install an agent. For customers, we offer open-source exporters and integrations that use the Telemetry SDKs to send metrics and trace data: Istio adaptor Prometheus OpenMetrics (for Docker | for Kubernetes) OpenCensus exporter (for Go | for Python) DropWizard exporter Micrometer exporter Want to build your own solution? See our Telemetry SDK docs. Step 3 of 6 Trace API Our Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources in one place. We accept trace data in two formats: Zipkin format New Relic format (if you don’t have Zipkin-format data, you’d use this) 1 curl -i -X POST https://trace-api.newrelic.com/trace/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -H 'Data-Format: newrelic' \\ 5 -H 'Data-Format-Version: 1' \\ 6 -d '[ 7 { 8 \"common\": { 9 \"attributes\": { 10 \"service.name\": \"Test Service A\", 11 \"host\": \"host123.test.com\" 12 } 13 }, 14 \"spans\": [ 15 { 16 \"trace.id\": \"123456\", 17 \"id\": \"ABC\", 18 \"attributes\": { 19 \"duration.ms\": 12.53, 20 \"name\": \"/home\" 21 } 22 }, 23 { 24 \"trace.id\": \"123456\", 25 \"id\": \"DEF\", 26 \"attributes\": { 27 \"service.name\": \"Test Service A\", 28 \"host\": \"host456.test.com\", 29 \"duration.ms\": 2.97, 30 \"name\": \"/auth\", 31 \"parent.id\": \"ABC\" 32 } 33 } 34 ] 35 } 36 ]' Copy Step 4 of 6 Metric API You can use our Metric API to send metric data to New Relic from any source. 1 curl -i -X POST https://metric-api.newrelic.com/metric/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"metrics\": [ 7 { 8 \"name\": \"memory.heap\", 9 \"type\": \"gauge\", 10 \"value\": 2.3, 11 \"timestamp\": 1531414060739, 12 \"attributes\": { 13 \"host.name\": \"dev.server.com\" 14 } 15 } 16 ] 17 } 18 ]' Copy Step 5 of 6 Event API For sending arbitrary events to New Relic, you can use our Event API. We save these events as a new event type, which can then be queried via NRQL. (Eventually, the Telemetry SDKs will support the Event API.) 1 curl -i -X POST https://insights-collector.newrelic.com/v1/accounts/$ACCOUNT_ID/events \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"x-insert-key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 { 6 \"eventType\": \"LoginEvent\", 7 \"service\": \"login-service\", 8 \"customerId\": \"xyz\" 9 } 10 ]' Copy Step 6 of 6 Log API If our existing logging integrations don’t meet your needs, you can use our Log API to send any arbitrary log data to New Relic. (Eventually, the Telemetry SDKs will support the Log API.) 1 curl -i -X POST https://log-api.newrelic.com/log/v1 \\ 2 -H \"Content-Type: application/json\" \\ 3 -H \"Api-Key: $INSIGHTS_INSERT_API_KEY\" \\ 4 -d '[ 5 \"logs\": [ 6 { 7 \"timestamp\": 1593538496000, 8 \"message\": \"User xyz logged in\", 9 \"service\": \"login-service\", 10 \"hostname\": \"login.example.com\" 11 } 12 ] 13 ]' Copy", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 73.86482, + "_score": 54.961803, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Collect data", - "sections": "Query data with NRQL", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "sections": "Agent APIs", + "info": "Open source emitters. APIs. New Relic agents. Get data from anywhere. ", + "tags": "Agent API", + "body": " agents to report data, you can use their associated APIs to report custom data. For example, if you monitor your application with the our APM Python agent, you can use the Python agent API to set up custom instrumentation. See the agent APIs. Step 2 of 6 Telemetry SDK Our Telemetry SDKs are language" }, - "id": "5efa997328ccbc768c307de2" + "id": "5efa997128ccbc3c9a307dfd" } ], - "/build-apps/add-time-picker-guide": [ + "/explore-docs/nr1-cli": [ { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic One CLI Nerdpack commands", + "Command details", + "nr1 nerdpack:build", + "Builds a Nerdpack", + "Usage", + "Options", + "nr1 nerdpack:clone", + "Clone an existing Nerdpack", + "nr1 nerdpack:serve", + "Serve your Nerdpack locally", + "nr1 nerdpack:uuid", + "Get your Nerdpack's UUID", + "nr1 nerdpack:publish", + "Publish your Nerdpack", + "nr1 nerdpack:deploy", + "Deploy your Nerdpack to a channel", + "nr1 nerdpack:undeploy", + "Undeploy your Nerdpack", + "nr1 nerdpack:clean", + "Removes all built artifacts", + "nr1 nerdpack:validate", + "Validates artifacts inside your Nerdpack", + "nr1 nerdpack:Info", + "Shows the state of your Nerdpack in the New Relic's registry" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:17:18Z", + "title": "New Relic One CLI Nerdpack commands", + "updated_at": "2020-09-17T01:49:55Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.28787, + "_score": 107.20494, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add a time picker to your app", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "New Relic One CLI Nerdpack commands", + "sections": "New Relic One CLI Nerdpack commands", + "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.", + "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f28bd6a64441f9817b11a38" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" ], - "published_at": "2020-10-05T01:45:14Z", - "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "title": "Intro to NerdStorage", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-06T02:13:00Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.173, + "_score": 102.86864, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add a time picker to your app", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "sections": "Use NerdStorage in your apps", + "info": "Intro to NerdStorage on New Relic One", + "tags": "new relic one apps", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989ee7b9d2048e7bab92" }, { "sections": [ @@ -2287,7 +1977,7 @@ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-05T01:55:26Z", + "published_at": "2020-10-06T02:11:40Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -2295,496 +1985,574 @@ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 118.285675, + "_score": 70.43678, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One apps", - "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations" }, "id": "5efa989e28ccbc4071307de5" }, { "sections": [ - "Add tables to your New Relic One application", + "Set up your development environment", "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Add tables to your New Relic One application", + "title": "Set up your development environment", "type": "developer", "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-05T01:53:45Z", - "updated_at": "2020-09-17T01:48:42Z", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 116.20769, + "_score": 54.21075, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "tags": "table in app", - "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo" + "sections": "Prepare to build or modify apps", + "info": "Prepare to build apps and contribute to this site", + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5efa989ee7b9d2ad567bab51" + "id": "5efa9973e7b9d242237bab39" }, { - "image": "", - "url": "https://developer.newrelic.com/components/platform-state-context/", "sections": [ - "PlatformStateContext", - "Usage", - "Props" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "published_at": "2020-10-05T02:03:34Z", - "title": "PlatformStateContext", - "updated_at": "2020-08-01T01:47:08Z", + "title": "Nerdpack file structure", "type": "developer", - "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-06T02:10:04Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.08571, + "_score": 50.149086, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "PlatformStateContext", - "sections": "PlatformStateContext", - "info": "A PlatformStateContext component!", - "body": "PlatformStateContext Usage Copy Props There are no props for this component." + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "New Relic One CLI", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5efa997128ccbccc6f307dc0" + "id": "5efa989e196a671300766404" } ], - "/collect-data/custom-attributes": [ + "/collect-data/collect-data-from-any-source": [ { - "image": "", - "url": "https://developer.newrelic.com/collect-data/", + "category_2": "Ingest APIs", + "nodeid": 35471, "sections": [ - "Collect data", - "Guides to collect data", - "Add custom attributes", - "Create custom events", - "Collect data - any source", - "Build queries with NerdGraph", - "Query data with NRQL" + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Telemetry SDKs: Report custom telemetry data", + "Requirements and compatibility", + "Available libraries", + "Write your own Telemetry SDK or contribute to an existing one", + "Integrations built with the Telemetry SDKs", + "For more help" ], - "published_at": "2020-10-05T01:53:45Z", - "title": "Collect data", - "updated_at": "2020-10-05T01:53:44Z", - "type": "developer", - "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6", + "title": "Telemetry SDKs: Report custom telemetry data", + "category_0": "Telemetry Data Platform", + "type": "docs", + "category_1": "Ingest and manage data", + "external_id": "47a4c8f38c1b1674504ea302d865fd499e90ea39", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-started/capabilities/telemetry-sdks-send-custom-telemetry-data-new-relic", + "published_at": "2020-10-03T22:04:50Z", + "updated_at": "2020-09-17T14:37:52Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes", - "info": "", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "body": "Our Telemetry SDKs are an open source set of API client libraries that send metrics and trace data to the New Relic platform. We offer open-source integrations for telemetry tools like Prometheus, Istio, and OpenCensus that were created using our Telemetry SDKs. If those solutions (or our other integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under an Apache 2.0 license. Available libraries The Telemetry SDKs are open source software on GitHub. Use the language-specific GitHub links below to get library details, coding examples, and procedures for how to use the SDKs. We currently support the following libraries, with more to be created in the future: Language Library Supported data types Java Java library on GitHub New Relic Metrics New Relic Traces Node/TypeScript NodeJS library on GitHub New Relic Metrics New Relic Traces Python Python library on GitHub New Relic Metrics New Relic Events New Relic Traces Go Go library on Github New Relic Metrics New Relic Traces .NET .NET library on GitHub .NET package in NuGet New Relic Metrics New Relic Traces C C library on Github New Relic Traces Rust Rust library on Github New Relic Traces For more on the supported data types: Metrics: see the Metric API Traces: see the Trace API Write your own Telemetry SDK or contribute to an existing one If you need a Telemetry SDK in a language that does not currently exist or want to contribute to an existing library, please see the Telemetry SDK specifications. Integrations built with the Telemetry SDKs To see the integrations built using our Telemetry SDKs, see Open source telemetry integrations. For all monitoring solutions, see our integrations page. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 148.25171, + "_score": 152.95216, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " data   Add custom attributes Use custom attributes for deeper analysis 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 15 min Collect data - any source APIs, agents, OS emitters - get any data 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes" + "title": "Telemetry SDKs: Report custom telemetry data", + "sections": "Telemetry SDKs: Report custom telemetry data", + "info": "Report custom telemetry data with New Relic's open-source Telemetry SDKs.", + "category_0": "Telemetry Data Platform", + "category_2": "Ingest APIs", + "body": " integrations) don't meet your needs, you can use the Telemetry SDKs to create your own telemetry data solutions. Requirements and compatibility To build with the Telemetry SDKs, you will need an Event API insert key. New Relic has contributed the Telemetry SDK to the open source community under", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5efa997328ccbc768c307de2" + "id": "5d89fefbe7b9d2537ed30dc1" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "category_2": "Custom events", + "nodeid": 13806, "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Event data sources", + "Default events", + "Custom events", + "Report custom event data", + "Overview of reporting custom events and attributes", + "Send custom events and attributes", + "Extend data retention", + "For more help" ], - "published_at": "2020-10-05T01:45:14Z", - "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", - "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "title": "Report custom event data", + "category_0": "Insights", + "type": "docs", + "category_1": "Event data sources", + "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data", + "published_at": "2020-10-03T18:11:46Z", + "updated_at": "2020-07-26T05:52:23Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "An overview of the options for sending custom event data to New Relic. ", + "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 93.54231, + "_score": 94.88649, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Add custom attributes", - "body": " custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin" + "title": "Report custom event data", + "sections": "Event data sources", + "info": "An overview of the options for sending custom event data to New Relic. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5e8e7f9de7b9d2aa122cf0f6" }, { - "category_2": "Measure DevOps success", - "nodeid": 16556, + "category_2": "Get started", + "nodeid": 36051, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: track experience indicators", - "Prerequisites", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Utilize data to separate performance by cohort and debug issues at the customer level", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Get data into New Relic", + "New Relic-built agents and integrations", + "Agent APIs", + "Telemetry SDKs", + "APIs for sending metrics, traces, logs, and events", + "New Relic One applications", "For more help" ], - "title": "Customer experience improvement: track experience indicators", - "category_0": "New Relic solutions", + "title": "Get data into New Relic", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-10-03T21:48:58Z", - "updated_at": "2020-09-27T21:45:56Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "category_1": "Ingest and manage data", + "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks", + "published_at": "2020-10-04T03:02:05Z", + "updated_at": "2020-08-10T23:16:39Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started", "document_type": "page", "popularity": 1, - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An introduction to how to get data into New Relic. ", + "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.997696, + "_score": 94.291504, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.", - "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order" + "sections": "APIs for sending metrics, traces, logs, and events", + "category_0": "Telemetry Data Platform", + "body": " also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started" }, - "id": "5f5adb2728ccbc7152532752" + "id": "5f24aa60196a67ede394f5f3" }, { - "category_2": "Optimize your cloud native environment", - "nodeid": 32796, + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Customer experience improvement: Track experience indicators", - "1. Use custom attributes to associate performance data", - "2. Create dashboards with performance and business metrics", - "3. Share dashboards across departments", - "4. Use data to separate performance by cohort and debug issues at the customer level", + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "Customer experience improvement: Track experience indicators", - "category_0": "New Relic solutions", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "New Relic solutions", - "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators", - "published_at": "2020-10-04T01:39:59Z", - "updated_at": "2020-09-27T20:35:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "image": "", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.84865, + "_score": 78.3562, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Customer experience improvement: Track experience indicators", - "sections": "1. Use custom attributes to associate performance data", - "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.", - "body": " with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase" + "title": "Data requirements and limits for custom event data", + "sections": "Additional Event API requirements", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "category_1": "Event data sources", + "category_2": "Custom events", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f5ac17528ccbce4f0532733" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "category_2": "Browser agent release notes", - "nodeid": 40791, + "category_2": "Java agent release notes", + "nodeid": 36271, "sections": [ - "Browser agent release notes", - "Browser Agent v1184", - "Release Dates", - "New Features", - "Added support for custom attributes on PageViewTiming events", - "Issue Resolutions", - "How to upgrade your agent" + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 5.8.0", + "New features", + "New OSS SDK", + "Fixes" ], - "title": "Browser Agent v1184", + "title": "Java Agent 5.8.0", "category_0": "Release notes", "type": "docs", - "category_1": "Browser agent release notes", - "external_id": "8c1161973a10dd4d4525ea36b7bd6f29014036ec", + "category_1": "APM agent release notes", + "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/new-relic-browser-release-notes/browser-agent-release-notes/browser-agent-v1184", - "published_at": "2020-10-03T14:39:21Z", - "updated_at": "2020-10-02T05:37:45Z", - "breadcrumb": "Contents / Release notes / Browser agent release notes / Browser agent release notes", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580", + "published_at": "2020-10-03T22:39:52Z", + "updated_at": "2019-10-31T15:19:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", "document_type": "release_notes", "popularity": -2, - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method will now be included in all PageViewTiming events. Issue Resolutions [SPA- BrowserInteractions] Fixed an issue resulting from too many fetch requests Resolved a bug throwing a null reference error during browser interactions where more than 128 fetch requests were recorded and distributed tracing was enabled. [PageViewTiming] Fixed an edge-case issue with the paint timing instrumentation In cases when nothing was painted to screen before the load event, the agent would throw an error. We have added a guard for this scenario. [PageViewTiming] Fixed issue with Largest Contentful Paint recording The browser agent stops recording largest contentful paint after 60 seconds on a page. We fixed an issue where recording continued beyond that threshold. How to upgrade your agent For instructions for upgrading your agent, please view our docs.", + "body": "[RSS] Released on:  Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 82.159515, + "_score": 72.64437, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Added support for custom attributes on PageViewTiming events", - "body": "[RSS] Released on:  Wednesday, September 30, 2020 - 15:49 Release Dates Staging release date: 09/28/2020 Production APM-injected release date: 9/30/2020 New Features Added support for custom attributes on PageViewTiming events Custom attributes created using the setCustomAttribute API method" + "title": "Java Agent 5.8.0", + "sections": "APM agent release notes", + "category_1": "APM agent release notes", + "category_2": "Java agent release notes", + "body": " agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes" }, - "id": "5f76bca928ccbcaa75337d9b" + "id": "5dbafb88196a67d9b59aa23d" } ], - "/terms": [ + "/automate-workflows/get-started-kubernetes": [ { - "category_2": "Product definitions", - "nodeid": 39646, + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "License information", - "General usage licenses", - "Special services licenses", - "Distributed licenses", - "Referenced policies", - "Product definitions", - "Usage plans", - "FAQ", - "New Relic One pricing: Definitions", - "For more help" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" ], - "title": "New Relic One pricing: Definitions", - "category_0": "Licenses", - "type": "docs", - "category_1": "License information", - "external_id": "097fc095ef18942f3af1845237742340e36416b8", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-09-10T14:58:10Z", - "breadcrumb": "Contents / Licenses / License information / Product definitions", + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means the non-cancelable, committed Subscription Term for the Products. Customer Data Customer Data means the data, information, or content that Customer and its users send to an Account from the Software, the Customer Properties, or Third-Party Services. Customer Properties Customer Properties means Customer’s websites, infrastructure, networks, mobile applications, or other systems, as well as Customer accounts on Third-Party Services. Documentation Documentation means the New Relic technical guides and documentation made available from the dedicated ‘Documentation’ page of the New Relic website. GB Ingested A GB Ingested is a measurement of the volume of metrics, events, logs, traces, or other telemetry data sent to or generated by the Products for the benefit of the Customer, including from the Software, the Customer Properties, or Third-Party Services. In this context, a GB is defined as 1 billion bytes. Login Credentials Login Credentials means the username, email address, password, or other personal information that is provided by a Customer user in order to manage an Account. Monthly Provisioned User A Monthly Provisioned User is any user who can log into Customer’s Account(s) and access the New Relic One Product functionality as specified in an Order and the Documentation. Order Order means the purchasing order for access to the Service or related services that: (1) is either executed by the Parties or entered into by you via self-service, and references this Agreement, or (2) is entered into by you and a Channel Partner. Paid Terms of Service Paid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/paid. Product(s) Product(s) mean the purchase of the New Relic subscription products described in the applicable Order and any updates, corrections, bug fixes, modifications, improvements, related services, new features, and functionality (made generally available to New Relic’s customer base) thereto. Software Software means the distributed software, APIs, scripts, or other code proprietary to New Relic provided with the Products. Terms Terms means the underlying Customer-New Relic agreement and the Order. Third-Party Services Third-Party Services means any third party platform, add-on, service, or product not provided by New Relic and that a user integrates or enables for use with the Products, including third-party applications and plug-ins. Unpaid Terms of Service Unpaid Terms of Service means the legal terms and conditions located at: https://newrelic.com/termsandconditions/unpaid. Usage Plan Usage Plan refers to the Service or Product pricing, invoicing related information, and product-specific terms (e.g. concurrent user account sessions) contained within the Documentation. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 337.42694, + "_score": 137.4776, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "This document provides definitions of terminology you may see in New Relic contracts.", - "body": "This document provides definitions of terminology you may see in the Terms or this site for New Relic One pricing and billing: Account Account refers to the online account or subaccounts that New Relic provides for customers to manage their use of the Products. Commitment Term Commitment Term means" + "sections": "Set up New Relic using the Kubernetes operator", + "body": " markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" }, - "id": "5f23b039196a67030b94f5c4" + "id": "5efa999c196a67dfb4766445" }, { - "image": "", - "url": "https://opensource.newrelic.com/cla/", + "category_2": "UI and data", + "nodeid": 34316, "sections": [ - "NEW RELIC, INC.", - "INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT", - "Definitions." + "Use New Relic One", + "Get started", + "Core concepts", + "UI and data", + "Workloads", + "Build on New Relic One", + "Entity explorer: View performance across apps, services, hosts", + "View entities", + "Health (alert) status", + "Filter by tag or entity name", + "Entity data retention", + "For more help" ], - "published_at": "2020-10-05T02:15:21Z", - "title": "New Relic Open Source Contributor License Agreement", - "updated_at": "2020-09-02T02:08:45Z", - "type": "opensource", - "external_id": "478151b2a97835e82c3cd1eaa49610793dc56783", + "title": "Entity explorer: View performance across apps, services, hosts", + "category_0": "New Relic One", + "type": "docs", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "external_id": "70c4dd2b7c228d80145ed4e4c120412a652346d8", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-entity-explorer.png", + "url": "https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "published_at": "2020-10-06T04:58:32Z", + "updated_at": "2020-10-06T04:58:32Z", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data", "document_type": "page", "popularity": 1, - "info": "", - "body": "New Relic Open Source External Projects Highlighted Projects New Relic Projects Menu External Projects Highlighted Projects New Relic Projects NEW RELIC, INC. INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement (\"Agreement\") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. Definitions. \"You\" (or \"Your\") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"Contribution\" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the \"Work\"). For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as \"Not a Contribution.\" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as \"Submitted on behalf of a third-party: [named here] \". You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. New Relic Open Source Standards External Projects Highlighted Projects New Relic Projects Edit this page Create an issue Copyright © 2020 New Relic Inc.Version 1.9.2", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "body": "Use the entity explorer to access the performance data from all your monitored applications, services, and hosts. For more about entities, see What is an entity? View entities To use the entity explorer: Go to one.newrelic.com and select Entity explorer. Your monitored entities are on the left. You may need to scroll your list of entities to see them all. one.newrelic.com > Entity explorer: Use the entity explorer to locate and examine the entities you monitor. The entity explorer brings together data reported from across all of New Relic. Entity categories include: Services: APM-monitored applications and services monitored. Hosts: your monitored infrastructure (your servers and hosts). Mobile applications: your mobile apps. Browser applications: your front-end browser apps. Integration-reported data: data from services monitored by our integrations, including our on-host integrations (like Kubernetes, StatsD, and NGINX), and cloud platform integrations, like Amazon, Microsoft Azure, and Google Cloud Platform (GCP). Health (alert) status The entity explorer shows a color-coded alert status for entities. For example, you may see a red alert status indicating a critical violation in progress. To see what an alert status means, mouse over it. To see details about an entity's alerting status, select the entity. NRQL alert conditions aren't used to determine alert status because they aren't associated with specific entities. Starting June 8, 2020, New Relic One will not continue to display any APM application that hasn't reported data for 93 days. To match our published APM data retention guidelines, applications that have not reported data will be available within the New Relic UI for 90 days. After 90 days, those applications will be removed from the UI; however, key metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags at the top of the page. For example, you may want to filter down to only entities tagged with production, or only entities with a specific AWS region tag. For more about tags, see Tagging. Filter by entity name: Use Search services by name at the top of the page. Entity data retention Availability of data depends on these factors: Scope Data retention Entity explorer and search In the UI, data is available for eight days after an entity no longer exists, with one exception: data reported by integrations, such as Amazon AWS, is only available for one day after an entity ceases to exist. Our database (accessible via NRQL query) For querying our database (for example, via the query builder or data explorer), availability is dependent on the data retention for that data type. As a result of these factors, a short-lived entity (like a cloud host) may not be available in the entity explorer list or via search, but its data may still be available via NRQL query. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 332.1804, + "_score": 111.32914, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except" + "sections": "Health (alert) status", + "body": " in progress. To see what an alert status means, mouse over it. To see details about an entity's alerting status, select the entity. NRQL alert conditions aren't used to determine alert status because they aren't associated with specific entities. Starting June 8, 2020, New Relic One will not continue" }, - "id": "5f31822264441fcbe056a984" + "id": "5d244a5864441fe577a72a1b" }, { - "category_2": "Developer Edition", - "nodeid": 39641, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Developer Program Resources", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Developer Program Resources", - "category_0": "Licenses", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Product or service licenses", - "external_id": "98308cfffa652e4c25967e1be5b848b9c28ca410", - "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-developer-edition/developer-program-resources", - "published_at": "2020-10-03T18:21:54Z", - "updated_at": "2020-08-08T19:17:02Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / Developer Edition", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "New Relic Developer edition policy", - "body": "As a customer, you are eligible to participate in New Relic’s Developer Program. Additional information and resources are available at New Relic’s Developer Program site. By downloading, accessing, or using the developer resources (including the CLI), you agree that usage of the developer resources is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your use of the New Relic developer resources are covered under a separate agreement, the above does not apply to you. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 331.56372, + "_score": 106.96115, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " is pursuant to the New Relic Developers Terms and Conditions and that you have the authority to bind your organization. Such terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not use these developer resources. If your" + "title": "Create NRQL alert conditions", + "sections": "Create NRQL alert conditions", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5f338507e7b9d2f670c9de83" + "id": "5f2d992528ccbc489d88dfc1" }, { - "category_2": "New Relic One", - "nodeid": 39366, + "category_2": "Alerts release notes", + "nodeid": 40776, "sections": [ - "Product or service licenses", - "New Relic One", - "APM", - "Browser", - "Developer Edition", - "Infrastructure", - "Insights", - "Logs", - "Mobile", - "Synthetics", - "Mobile apps", - "Plugins", - "Miscellaneous", - "Preview access for New Relic One", - "For more help" + "New Relic Platform release notes", + "Alerts release notes", + "APM release notes", + "Cloud Integrations release notes", + "Diagnostics release notes", + "Mobile release notes", + "Kubernetes integration release notes", + "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "Component: NRQL Conditions (Review Required)", + "Announcing : New Relic One Streaming Alerts", + "Please read the full announcement and FAQ here , and follow the links to enroll." ], - "title": "Preview access for New Relic One", - "category_0": "Licenses", + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_0": "Release notes", "type": "docs", - "category_1": "Product or service licenses", - "external_id": "eae3865081d3bd8ad2dd8b6eaf0fe0147355360c", + "category_1": "New Relic Platform release notes", + "external_id": "74ae41c7360962287ea605016bf7731035382166", "image": "", - "url": "https://docs.newrelic.com/docs/licenses/product-or-service-licenses/new-relic-one/preview-access-new-relic-one", - "published_at": "2020-10-04T06:02:04Z", - "updated_at": "2020-07-31T04:41:27Z", - "breadcrumb": "Contents / Licenses / Product or service licenses / New Relic One", - "document_type": "page", + "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", + "published_at": "2020-10-03T14:38:29Z", + "updated_at": "2020-09-29T22:06:08Z", + "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", + "document_type": "release_notes_platform", "popularity": 1, - "body": "As a customer with a paid subscription to New Relic products, you are eligible to participate in preview access of the New Relic One platform (e.g. Telemetry Data Platform, Full Stack Observability, and Applied Intelligence products) for the period beginning July 31, 2020 and ending December 31, 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding. If you do not agree to these terms and conditions, your sole remedy is to not participate in Preview Access. New Relic reserves the right to terminate or restrict Preview Access, in whole or in part, at any time. Notwithstanding the foregoing and any other materials provided by New Relic, select customers are ineligible for the Preview Access. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 323.886, + "_score": 85.42116, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": ", 2020 (“Preview Access”). BY DOWNLOADING, ACCESSING, INDICATING YOUR AGREEMENT TO, OR USING THE PREVIEW ACCESS PRODUCTS, YOU AGREE THAT YOUR PREVIEW ACCESS USAGE IS PURSUANT TO THESE SEPARATE TERMS AND CONDITIONS IN LIEU OF ANY OTHER TERMS. These terms do not have to be signed in order to be binding" + "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", + "category_2": "Alerts release notes", + "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" }, - "id": "5f23a0f7e7b9d29da9c82305" + "id": "5f735c6964441f8a6aeb7297" }, { - "category_2": "Data privacy", - "nodeid": 1591, + "category_2": "Alert conditions", + "nodeid": 7261, "sections": [ - "Security and Privacy", - "Data privacy", - "Compliance", - "Information security", - "Security bulletins", - "Security controls for privacy", - "Secured content", - "Analytics", - "Data transmission and firewalls", - "Hosting and data storage", - "Data access", - "HTTP parameters disabled by default", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Set thresholds for an alert condition", + "What is a threshold?", + "View and set thresholds", "For more help" ], - "title": "Security controls for privacy", - "category_0": "New Relic Security and Privacy", + "title": "Set thresholds for an alert condition", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Security and Privacy", - "external_id": "bc8220cf6b971d3e72dbcd38b006d799a1041cd3", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", "image": "", - "url": "https://docs.newrelic.com/docs/security/security-privacy/data-privacy/security-controls-privacy", - "published_at": "2020-10-04T07:08:53Z", - "updated_at": "2020-09-24T07:44:02Z", - "breadcrumb": "Contents / New Relic Security and Privacy / Security and Privacy / Data privacy", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "published_at": "2020-10-03T18:47:38Z", + "updated_at": "2020-09-30T13:34:48Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "body": "This document describes how New Relic protects the security of your data. For more information about our security measures, see our data privacy documentation and the New Relic Security website. Secured content Data for New Relic accounts are isolated so that users can only see the data for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services to better understand the behavior of users on our site. The user data that New Relic collects is used solely by New Relic and is not shared, sold, or rented to any third parties for their own use. For more information, see our Services data privacy notice. Data transmission and firewalls The New Relic agent communicates with two hosts: collector.newrelic.com collector-nnn.newrelic.com, where nnn is a numerical value Typically the numbered host is fixed for your account, and it appears in log/newrelic.agent.log. For required changes when you want to create firewall rules to allow the agent to communicate, see Networks. For more information about security measures for your data in transit to New Relic or at rest in our storage, see Data encryption. Hosting and data storage New Relic is self-hosted with co-location services called Server Central in a Tier 3 data center in Chicago, Illinois and an IBM-hosted data center near Frankfurt, Germany, as well as cloud storage through Amazon AWS. We use standard best practices to maintain a firewall for our servers and to protect our servers from unauthorized login. All data is stored in a cluster of MySQL databases. New Relic data is backed up nightly, and an archive is stored at a secondary data center. Data access Access to account data by New Relic employees is limited to a necessary set of users consistent with their assigned New Relic responsibilities. Except to the extent necessary to provide subscribed services and as documented in our Services data privacy notice, customer account data is not shared with any third parties. All customer account data access is logged and regularly audited. HTTP parameters disabled by default By default, New Relic agents disable collection of HTTP request parameters, such as the query string of a URL. This is an automatic safeguard to protect potentially sensitive data. New Relic collects and displays HTTP parameters only when you explicitly enable them in your agent configuration file. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 312.1698, + "_score": 79.26051, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Security and Privacy", - "info": "New Relic data security: content, analytics, transmission, hosting and storage, data access, etc. For complete details, see https://newrelic.com/security", - "category_0": "New Relic Security and Privacy", - "category_1": "Security and Privacy", - "body": " for accounts they own (or have been given permission to see). New Relic also has certain rights regarding customers' data, described in the Terms and Conditions page on the New Relic website. Analytics In order to help us improve our product and user experience, New Relic uses third-party analytics services" + "title": "Set thresholds for an alert condition", + "sections": "Alert conditions", + "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", + "category_0": "Alerts and Applied Intelligence", + "category_1": "New Relic Alerts", + "category_2": "Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", + "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" }, - "id": "5e30b8a864441f47ebd05cb0" + "id": "5f2d847c64441fc0a656a98a" } ], "/explore-docs/nr1-common": [ @@ -2810,7 +2578,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -2818,7 +2586,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 198.33485, + "_score": 195.26459, "_version": null, "_explanation": null, "sort": null, @@ -2839,23 +2607,23 @@ "Guides to automate workflows", "Quickly tag resources", "Set up New Relic using Helm charts", + "Automate common tasks", "Set up New Relic using the Kubernetes operator", "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", "Set up New Relic using Terraform" ], - "published_at": "2020-10-05T01:53:44Z", + "published_at": "2020-10-06T02:07:11Z", "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", + "updated_at": "2020-10-06T02:07:11Z", "type": "developer", "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 152.77304, + "_score": 163.90459, "_version": null, "_explanation": null, "sort": null, @@ -2884,18 +2652,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-05T01:45:14Z", + "published_at": "2020-10-06T01:57:17Z", "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 149.81282, + "_score": 149.79515, "_version": null, "_explanation": null, "sort": null, @@ -2919,7 +2687,7 @@ "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, @@ -2927,7 +2695,7 @@ "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 130.6808, + "_score": 130.16217, "_version": null, "_explanation": null, "sort": null, @@ -2978,445 +2746,651 @@ "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", "document_type": "page", "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 118.96566, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" + } + ], + "/explore-docs/nr1-nerdpack": [ + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/", + "sections": [ + "New Relic One CLI subscription commands", + "Command details", + "nr1 subscription:set", + "Subscribe to a Nerdpack", + "Usage", + "Options", + "Aliases", + "nr1 subscription:list", + "See your subscription", + "nr1 subscription:unset", + "Unsubscribe from a Nerdpack" + ], + "published_at": "2020-10-06T02:11:40Z", + "title": "New Relic One CLI subscription commands", + "updated_at": "2020-08-06T01:44:54Z", + "type": "developer", + "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 765.18787, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI subscription commands", + "sections": "New Relic One CLI subscription commands", + "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.", + "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1" + }, + "id": "5f2b6096e7b9d225ebc9de6f" + }, + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", + "sections": [ + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" + ], + "published_at": "2020-10-06T02:14:19Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "document_type": "page", + "popularity": 1, + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 538.7417, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command" + }, + "id": "5f28bd6ae7b9d267996ade94" + }, + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" + ], + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-09-17T01:51:10Z", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 276.9475, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI Commands", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": ". For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet" + }, + "id": "5efa989e28ccbc535a307dd0" + }, + { + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/", + "sections": [ + "New Relic One CLI catalog commands", + "Command details", + "nr1 catalog:info", + "Get catalog details", + "Usage", + "Options", + "nr1 catalog:submit", + "Send info to the catalog" + ], + "published_at": "2020-10-06T02:11:40Z", + "title": "New Relic One CLI catalog commands", + "updated_at": "2020-08-14T01:49:24Z", + "type": "developer", + "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031", + "document_type": "page", + "popularity": 1, + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 126.639145, + "_score": 153.85475, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + "title": "New Relic One CLI catalog commands", + "sections": "New Relic One CLI catalog commands", + "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.", + "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits" }, - "id": "5e9af5ba28ccbc3d4fd94a21" - } - ], - "/automate-workflows/automated-tagging": [ + "id": "5f28bd6a64441f805eb11a26" + }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", + "title": "Nerdpack file structure", "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-06T02:10:04Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 197.05257, + "_score": 147.91577, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate workflows", - "sections": "Automatically tag a simple "Hello World" Demo across the entire stack", - "body": " resources using the Kubernetes operator 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "New Relic One CLI", + "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, - "id": "5efa999c196a67dfb4766445" - }, + "id": "5efa989e196a671300766404" + } + ], + "/explore-docs/nerdstorage": [ { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "Create a custom map view", + "Publish and deploy apps" ], - "published_at": "2020-10-05T01:45:14Z", - "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 100.24698, + "_score": 413.54318, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Automate common tasks", - "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" + "title": "Build apps", + "sections": "Add, query, and mutate data using NerdStorage", + "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to New Relic One" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa999d64441fc0f75f7e21" }, { - "category_2": "Get started", - "nodeid": 11261, "sections": [ - "Amazon integrations", + "Add, query, and mutate data using NerdStorage", + "Before you begin", "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", - "For more help" + "Add data to NerdStorage", + "Query data from NerdStorage", + "Mutate data in NerdStorage", + "Delete collection from NerdStorage", + "Next steps" ], - "title": "Integrations and managed policies", - "category_0": "Integrations", - "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "title": "Add, query, and mutate data using NerdStorage", + "type": "developer", + "tags": [ + "add data", + "query data", + "mutate data", + "nerdstorage" + ], + "external_id": "97cc9637edea35ecd68683f1010f67a5f8c79038", + "image": "https://developer.newrelic.com/static/e03456a7ed8556f83bd3329ea38b261d/8f217/add-data-NerdStorage.png", + "url": "https://developer.newrelic.com/build-apps/add-query-mutate-data-nerdstorage/", + "published_at": "2020-10-06T02:13:00Z", + "updated_at": "2020-08-30T01:49:16Z", "document_type": "page", "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "body": "Add, query, and mutate data using NerdStorage 45 min NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. Using NerdStorage, you can create individual documents of up to 64kb in size, create different collections of documents, and store data by entity, account, or user level. This guide explains how to add data and documents to NerdStorage. For an introduction to what NerdStorage is and how it works, see Intro to NerdStorage. Before you begin This guide requires that you have an API key and the New Relic One CLI as described in Set up your development environment. Get started First, get the NerdStorage app running successfully inside New Relic One. Step 1 of 3 Clone the example applications from the GitHub repo. Step 2 of 3 Use the New Relic One CLI to update the application UUID and run the application locally. In the terminal, switch to the /nr1-how-to/use-nerdstorage directory: cd / nr1 - how - to / use - nerdstorage; Copy Update the UUID and serve the application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 3 of 3 Once the app is successfully served, your terminal will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data. On the How To Use NerdStorage app screen, there's a Saved to NerdStorage pane with a field for adding data. However, if you type something you'll get an error message. This is because you need to be set up to store data at the User level. You can do this with the help of the UserStorageMutation component. Step 1 of 3 Open the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file in the text editor of your choice and find the code for the TextField and Button used to enter data. The Button onClick prop makes a call to a helper method called _addToNerdStorage, and you need to update it to add UserStorageMutation The UserStorage NerdStorage components require a collection and documentId. In the constructor method in the application’s index.js file, you can see the variables being provided. In the .js file, it will look something like this: constructor(props) { super(props) this.collectionId = 'mycollection'; this.documentId = 'learning-nerdstorage'; this.state = { isOpen: true, storage: [], text: '', }; this._addToNerdStorage = this._addToNerdStorage.bind(this); this._removeFromNerdStorage = this._removeFromNerdStorage.bind(this); this._deleteDocument = this._deleteDocument.bind(this); } Copy Step 2 of 3 Import the UserStorageMutation by adding it to your import statement at the top of the index.js file: import { UserStorageMutation } from 'nr1'; Copy Then update the helper with this code beginning with _addToNerdStorage: _addToNerdStorage(){ const { text, storage } = this.state; storage.push(text); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { this.setState({text: ''}); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Step 3 of 3 Return to your running How To Use NerdStorage app screen on New Relic One and reload the page. Add some text in the text entry field and click the check button. This will update NerdStorage and trigger a Toast notification inside the app. You should then see the text you typed displayed as a table row below the text entry field. Query data from NerdStorage Once you get data storage working as described in the section above, you also need to get the app properly reading data from NerdStorage, or the app will reload with an empty state every time you navigate away from the app page and back. To do this, add the UserStorageQuery component and update the componentDidMount method. Step 1 of 3 Import the UserStorageQuery by adding it to the import statement in the application’s ./nerdlets/use-nerdstorage-nerdlet/index.js file. import { UserStorageMutation, UserStorageQuery } from 'nr1'; Copy Step 2 of 3 Then, add the following componentDidMount method to your application: componentDidMount(){ UserStorageQuery.query({ collection: this.collectionId, documentId: this.documentId, }) .then(({ data }) => { if(data !== null) { this.setState({storage: data.storage}); } }) .catch(err => console.log(err)); } Copy Step 3 of 3 Back inside the NerdStorage app, test your changes by adding a few more rows using the text entry field. Then exit and relaunch the application. The application should load and show all the data you entered before you navigated away. Mutate data in NerdStorage Each NerdStorage entry displayed in the table inside the app has a trash button that can be used to update a specific entry. The trash button works by making a call to the _removeFromNerdStorage helper method. Step 1 of 1 To get this process working, update the code in _removeFromNerdStorage: _removeFromNerdStorage(index, data){ const { storage } = this.state; storage.pop(data); this.setState({storage}, () => { UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.WRITE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, document: { storage }, }) .then((res) => { Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.NORMAL }); }) .catch((err) => console.log(err)); }); } Copy Once you do this, clicking the trash button removes the item it's associated with, and the app updates to show the change. Delete collection from NerdStorage While the trash button is a good method for removing specific entries one at a time, you may also want the ability to delete a whole NerdStorage document at once. You can do this by adding the Delete Document button to your app. Step 1 of 2 Add a new GridItem to the application immediately before the closing Grid tag. In the new GridItem add the following code to display your new button: ; Copy Step 2 of 2 Because the new Delete Document button will be calling the _deleteDocument helper method, you'll need to update that using this code: _deleteDocument(){ this.setState({storage: []}); UserStorageMutation.mutate({ actionType: UserStorageMutation.ACTION_TYPE.DELETE_DOCUMENT, collection: this.collectionId, documentId: this.documentId, }); Toast.showToast({ title: \"NerdStorage Update.\", type: Toast.TYPE.CRITICAL }); } Copy Back inside the application, you should now see both the individual trash buttons and the newly added Delete Document button. Next steps Now that you’ve successfully implemented NerdStorage into a New Relic One application, you can store and mutate data connected to your User. For more information on the various NerdStorage components, please visit the New Relic developer website API documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.11081, + "_score": 259.16516, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": ": Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional" + "title": "Add, query, and mutate data using NerdStorage", + "sections": "Add, query, and mutate data using NerdStorage", + "info": "NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next.", + "tags": "nerdstorage", + "body": " will return the URL to view your running application on New Relic One. Load the URL. Click Apps and under Your apps you'll see the Use Nerdstorage app listed. Click to launch the app. Add data to NerdStorage Once the app is up and running on New Relic One, you can prepare the app and start adding data" }, - "id": "5d6c1f4828ccbce6928f6fe0" + "id": "5efa98d4e7b9d26d6b7bab74" }, { - "category_2": "Examples", - "nodeid": 34236, "sections": [ - "NerdGraph", - "Get started", - "Examples", - "NerdGraph tagging API tutorial", - "Read tags for an entity", - "Add tags for an entity", - "Remove a tag from an entity", - "Delete specific tag values for an entity", - "Replace all tag values for an entity", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "NerdGraph tagging API tutorial", - "category_0": "APIs", - "type": "docs", - "category_1": "NerdGraph", - "external_id": "c4b8fbf4f75b862f2b6e3caad723935febb89815", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-tagging-api-tutorial", - "published_at": "2020-10-04T02:41:20Z", - "updated_at": "2020-07-26T05:41:24Z", - "breadcrumb": "Contents / APIs / NerdGraph / Examples", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-06T02:11:40Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": "New Relic One provides unified access to all the entities you monitor with New Relic. Tags are used to organize and group all your entities in a way that's useful for troubleshooting and understanding your environment. To add, delete, or modify your tags, use the NerdGraph GraphiQL explorer. NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find the entity and then fetch its tags. Use NerdGraph's tag API to read the existing tags and their values. In this example, our entity is a browser app called Cookie Checkout: { actor { entitySearch (query: \"name like 'Cookie Checkout'\") { results { entities { tags { key values } } } } } } The actual values vary depending on your data. Use the New Relic GraphiQL explorer to experiment with queries. Add tags for an entity To add new tags for an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity you want to tag. Use the taggingAddTagsToEntity mutation to add a tag with a value to the entity. In this example, we have a browser application called Cookie Checkout owned by a UI team. We want to add a team tag with a ui value to this instance. Once the tag is added, we can filter by the tag team:ui and find the Cookie Checkout app in the New Relic One UI. mutation { taggingAddTagsToEntity ( guid: \"ENTITY_GUID\", tags: { key: \"team\", values: [\"ui\"]}) { errors { message } } } Remove a tag from an entity To delete a tag and all of its associated values from an entity: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagFromEntity mutation. The following example mutation removes the team tag from an entity: mutation { taggingDeleteTagFromEntity ( guid: \"ENTITY_GUID\", tagKeys: [\"team\"]) { errors { message } } } Delete specific tag values for an entity Instead of deleting an entire tag and all of its values, you can delete a single tag value. Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingDeleteTagValuesFromEntity mutation. The following example mutation deletes the ui value from the tag key: mutation { taggingDeleteTagValuesFromEntity ( guid: \"ENTITY_GUID\", tagValues : [{key: \"team\" value: \"ui\"}]) { errors { message } } } Because tagValues is an array, you can delete multiple specific values from a single entity in one mutation. Replace all tag values for an entity To replace all the existing values for a tag with new ones: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to locate the GUID for the entity with the tag you want to remove. Use the taggingReplaceTagsOnEntity mutation. In this example, the Cookie Checkout browser application was transferred from the ui team to the cookie-dev team. You can replace the tag values for team with the following mutation: mutation { taggingReplaceTagsOnEntity ( guid: \"ENTITY_GUID\", tags: {key: \"team\" values: [\"cookie-dev\"]}) { errors { message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 86.5648, + "_score": 193.41, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "NerdGraph tagging API tutorial", - "sections": "NerdGraph tagging API tutorial", - "info": "Use New Relic's NerdGraph (our GraphQL API) to manage tags attached to your entities. ", - "body": ". NerdGraph allows you to tag your entities with a key and an associated list of values. You can also use NerdGraph to query entities. Read tags for an entity To construct these queries and see responses: Go to the NerdGraph GraphiQL explorer at https://api.newrelic.com/graphiql. Use entitySearch() to find" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc" }, - "id": "5d8024fc28ccbcc5e9499cf1" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Measure DevOps success", - "nodeid": 34966, "sections": [ - "New Relic solutions", - "Measure DevOps success", - "Cloud adoption", - "Optimize your cloud native environment", - "Automate instrumentation", - "Prerequisite", - "1. Make instrumentation part of every build", - "2. Take advantage of integrations and existing tools", - "3. Leverage the power of APIs", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 174.15456, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI Reference", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, + { + "sections": [ + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Automate instrumentation", - "category_0": "New Relic solutions", - "type": "docs", - "category_1": "New Relic solutions", - "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png", - "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation", - "published_at": "2020-10-03T22:22:40Z", - "updated_at": "2020-09-28T01:04:02Z", - "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 82.47502, + "_score": 144.17358, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Automate instrumentation", - "sections": "Automate instrumentation", - "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ", - "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use" }, - "id": "5f5e0c14196a67e25fce6a8a" + "id": "5efa989e28ccbc535a307dd0" } ], - "/build-apps/publish-deploy": [ + "/automate-workflows/5-mins-tag-resources": [ { - "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", "Add a table to your app", + "Collect data - any source", + "Automate common tasks", "Create a custom map view", - "Publish and deploy apps" + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T01:57:17Z", + "title": "New Relic Developers", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 167.10019, + "_score": 178.35022, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Publish and deploy apps", - "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5d6fe49a64441f8d6100a50f" }, { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" ], - "title": "Permissions for managing applications", + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" - ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-09-02T02:04:41Z", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 58.86409, + "_score": 158.36278, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "managing apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment" }, - "id": "5f45bf2864441ffb4dfdcdbb" + "id": "5efa999c196a67dfb4766445" }, { - "category_2": "Hosting services", - "nodeid": 13151, + "category_2": "UI and data", + "nodeid": 34316, "sections": [ - "Node.js agent", - "Getting started", - "Installation and configuration", - "Supported features", - "Attributes", - "API guides", - "Hosting services", - "Troubleshooting", - "Install New Relic Node.js agent in GAE flexible environment", - "Use native deploy", - "Build a custom runtime", - "Optional: Disable health checks", - "Get New Relic agent troubleshooting logs from GAE", + "Use New Relic One", + "Get started", + "Core concepts", + "UI and data", + "Workloads", + "Build on New Relic One", + "Entity explorer: View performance across apps, services, hosts", + "View entities", + "Health (alert) status", + "Filter by tag or entity name", + "Entity data retention", "For more help" ], - "title": "Install New Relic Node.js agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Entity explorer: View performance across apps, services, hosts", + "category_0": "New Relic One", "type": "docs", - "category_1": "Node.js agent", - "external_id": "92a838b215a23bd47fcc8b45abdf347c56f720db", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/nodejs-agent/hosting-services/install-new-relic-nodejs-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:40:01Z", - "updated_at": "2020-08-18T06:29:37Z", - "breadcrumb": "Contents / APM agents / Node.js agent / Hosting services", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "external_id": "70c4dd2b7c228d80145ed4e4c120412a652346d8", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-entity-explorer.png", + "url": "https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "published_at": "2020-10-06T04:58:32Z", + "updated_at": "2020-10-06T04:58:32Z", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data", "document_type": "page", "popularity": 1, - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": "With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's \"native mode\" installation with your Node.js app: Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. Optional: Set environment variables to configure the Node.js agent's GAE app.yaml file. Use the Google Cloud SDK's gcloud command line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command: gcloud --project new-relic-apm-nodejs app deploy Google App Engine automatically includes your Node.js app's newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Google App Engine's documentation for Node.js Google App Engine's tutorial to deploy a Node.js app 1. Set up the GAE project and install dependencies Follow standard procedures to install New Relic's Node.js agent, including your license key. Be sure to save the newrelic module to the package.json file. Follow Google App Engine procedures for Node.js to create a new Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex Optional: Set environment variables. 3. Configure and deploy The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. To create the Dockerfile, build the container, and deploy your app, follow the GAE procedures for Node.js. Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Optional: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM. If you notice performance issues, disable GAE health checks. In your app.yaml, add: health_check: enable_health_check: False Get New Relic agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect New Relic Node.js agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.js configuration file to: log_file_name: STDOUT To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "body": "Use the entity explorer to access the performance data from all your monitored applications, services, and hosts. For more about entities, see What is an entity? View entities To use the entity explorer: Go to one.newrelic.com and select Entity explorer. Your monitored entities are on the left. You may need to scroll your list of entities to see them all. one.newrelic.com > Entity explorer: Use the entity explorer to locate and examine the entities you monitor. The entity explorer brings together data reported from across all of New Relic. Entity categories include: Services: APM-monitored applications and services monitored. Hosts: your monitored infrastructure (your servers and hosts). Mobile applications: your mobile apps. Browser applications: your front-end browser apps. Integration-reported data: data from services monitored by our integrations, including our on-host integrations (like Kubernetes, StatsD, and NGINX), and cloud platform integrations, like Amazon, Microsoft Azure, and Google Cloud Platform (GCP). Health (alert) status The entity explorer shows a color-coded alert status for entities. For example, you may see a red alert status indicating a critical violation in progress. To see what an alert status means, mouse over it. To see details about an entity's alerting status, select the entity. NRQL alert conditions aren't used to determine alert status because they aren't associated with specific entities. Starting June 8, 2020, New Relic One will not continue to display any APM application that hasn't reported data for 93 days. To match our published APM data retention guidelines, applications that have not reported data will be available within the New Relic UI for 90 days. After 90 days, those applications will be removed from the UI; however, key metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags at the top of the page. For example, you may want to filter down to only entities tagged with production, or only entities with a specific AWS region tag. For more about tags, see Tagging. Filter by entity name: Use Search services by name at the top of the page. Entity data retention Availability of data depends on these factors: Scope Data retention Entity explorer and search In the UI, data is available for eight days after an entity no longer exists, with one exception: data reported by integrations, such as Amazon AWS, is only available for one day after an entity ceases to exist. Our database (accessible via NRQL query) For querying our database (for example, via the query builder or data explorer), availability is dependent on the data retention for that data type. As a result of these factors, a short-lived entity (like a cloud host) may not be available in the entity explorer list or via search, but its data may still be available via NRQL query. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 31.179255, + "_score": 99.34349, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Use native deploy", - "info": "How to install your APM's Node.js app in the Google App Engine (GAE) flexible environment. ", - "body": ". This document explains how to add New Relic to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Use native deploy To use Google App Engine's "native mode" installation with your" + "sections": "Use New Relic One", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "category_0": "New Relic One", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "body": " metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data" }, - "id": "5972fea707552313d3f9ba8d" + "id": "5d244a5864441fe577a72a1b" }, { - "category_2": "Hosting services", - "nodeid": 13866, + "category_2": "Get started", + "nodeid": 11261, "sections": [ - "Python agent", - "Getting started", - "Installation", - "Configuration", - "Supported features", - "Back-end services", - "Custom instrumentation", - "API guides", - "Python agent API", - "Web frameworks and servers", - "Hosting services", - "Attributes", + "Amazon integrations", + "Get started", + "AWS integrations list", "Troubleshooting", - "Install the Python agent in GAE flexible environment", - "Deploy using GAE's native support", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", "For more help" ], - "title": "Install the Python agent in GAE flexible environment", - "category_0": "APM agents", + "title": "Integrations and managed policies", + "category_0": "Integrations", "type": "docs", - "category_1": "Python agent", - "external_id": "c1ce9a74f2eccba9cf0cd509a6f15f2d02fabb16", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", "image": "", - "url": "https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-python-agent-gae-flexible-environment", - "published_at": "2020-10-03T15:11:18Z", - "updated_at": "2020-08-30T17:24:26Z", - "breadcrumb": "Contents / APM agents / Python agent / Hosting services", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", "document_type": "page", "popularity": 1, - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": "With the Python agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding agent data to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic One. This document explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's \"native mode\" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine \"native mode\" installation, you provide your app code and an app.yaml file. Google App Engine then deploys to a standard prebuilt Docker image. For example, to deploy with native support for a Flask/Django app: Follow standard procedures to install the Python agent, including your license key. Set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to newrelic.ini. Once the agent and configuration file have been installed, the Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add agent data to your GAE flex app by building a custom runtime for Docker. For more information about deploying and configuring your Node.js app in the GAE flexible environment, see: Our GAE flex examples on Github for Python Google App Engine's documentation for Python Google App Engine's tutorials to deploy a Python app 1. Set up the GAE project and install dependencies When building a custom runtime using Docker, set the NEW_RELIC_CONFIG_FILE as an environment variable pointing to the Dockerfile instead of to your Python app's newrelic.ini. Follow standard procedures to install the Python agent, including your license key. Follow Google App Engine procedures Python to create a Google Cloud Platform project, create an App Engine application, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: env: flex runtime: custom 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn. These procedures are similar to the Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc). # [START dockerfile] FROM gcr.io/google_appengine/python # Install the fortunes binary from the debian repositories. RUN apt-get update && apt-get install -y fortunes # Optional: Change the -p argument to use Python 2.7. RUN virtualenv /env -p python3.5 # Set virtualenv environment variables. This is equivalent to running # source /env/bin/activate. ENV VIRTUAL_ENV /env ENV PATH /env/bin:$PATH ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ CMD NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -b :$PORT main:app # [END dockerfile] 4. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud app deploy Wait until the deployment completes. To open the app in the browser, run the following command: gcloud app browse To view your GAE flex app data, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance. To redirect Python agent logs to Stackdriver in the Cloud Platform Console, add the following statement to the newrelic.ini configuration: log_file = stderr To view the logs, use the Cloud Platform Console's Log Viewer. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 21.092176, + "_score": 98.71754, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Deploy using GAE's native support", - "info": "How to install your Python app in the Google App Engine (GAE) flexible environment. ", - "body": " explains how to add agent data to your GAE flex app using either of these methods: Google App Engine's "native mode" installation with a standard GAE runtime Docker installation using a custom runtime Deploy using GAE's native support When using Google App Engine "native mode" installation, you provide" + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" }, - "id": "5f3fb624196a672fda1cd4a3" + "id": "5d6c1f4828ccbce6928f6fe0" }, { - "category_2": "Installation", - "nodeid": 13121, "sections": [ - "Go agent", - "Get started", - "Installation", - "Configuration", - "Instrumentation", - "API guides", - "Features", - "Troubleshooting", - "Install the Go agent in GAE flexible environment", - "Build a custom runtime using Docker", - "Recommendation: Disable health checks", - "Get agent troubleshooting logs from GAE", - "For more help" + "Get started with the New Relic CLI", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Get your application details", + "Add a simple tag to your application", + "Bonus step: Create a deployment marker", + "Next steps" ], - "title": "Install the Go agent in GAE flexible environment", - "category_0": "APM agents", - "type": "docs", - "category_1": "Go agent", - "external_id": "d6409627d1a1d951d544a84613ad1709456f4560", + "title": "Get started with the New Relic CLI", + "type": "developer", + "tags": [ + "api key", + "New Relic CLI", + "Tags", + "Entity", + "Deployment markers" + ], + "external_id": "531f2f3985bf64bb0dc92a642445887095048882", "image": "", - "url": "https://docs.newrelic.com/docs/agents/go-agent/installation/install-go-agent-gae-flexible-environment", - "published_at": "2020-10-03T17:53:58Z", - "updated_at": "2020-08-15T09:48:00Z", - "breadcrumb": "Contents / APM agents / Go agent / Installation", + "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", + "published_at": "2020-10-06T02:07:12Z", + "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": "With our Go agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring. Here we explain how to add New Relic to your GAE flex app by configuring a custom runtime, and give an example of deploying a Go app with Docker. The Go agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's \"native mode\" installation. Build a custom runtime using Docker See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the Go agent, building a custom Go runtime for Docker, and deploying a golang application. For more information about deploying and configuring your Go app in the GAE flexible environment, see: Google App Engine's documentation for Go Google App Engine's tutorials to deploy a Go app 1. Set up the GAE project and install dependencies Follow standard procedures to install the Go agent for your specific app server, including your license key. Follow Google App Engine procedures for Go to create a new Cloud Platform project, create an App Engine application, download and install git, and complete other prerequisites for the Google Cloud SDK. The Google Cloud SDK provides the gcloud command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example code defines the golang version used. FROM golang:1.8-onbuild CMD go run main.go 4. Build a Docker image To build the Docker image, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files. docker build --rm -t Docker-image-name . 5. Deploy Docker image to initialized GAE flexible environment To deploy your Docker image to your initialized GAE flexible environment, run the following command: gcloud --project go-app-name app deploy Wait until the deployment completes. To view your GAE flex app data in New Relic, go to the APM Summary page. Recommendation: Disable health checks Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health. If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM. Recommendation: Configure your app.yaml to disable health checks by adding: health_check: enable_health_check: False Get agent troubleshooting logs from GAE Use these resources to troubleshoot your GAE flex environment app: To connect to the GAE instance and start a shell in the Docker container running your code, see GAE's documentation for debugging an instance. To redirect New Relic Go agent logs to Stackdriver in the Cloud Platform Console, change the newrelic.yml file to: log_file_name: STDOUT For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 19.590069, + "_score": 98.54703, "_version": null, "_explanation": null, "sort": null, "highlight": { - "info": "How to install your New Relic's Go app in the Google App Engine (GAE) flexible environment. ", - "body": " command line tool to manage and deploy GAE apps. 2. Configure your app.yaml The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains: runtime: custom env: flex 3. Configure a Dockerfile The Dockerfile defines the Docker" + "title": "Get started with the New Relic CLI", + "sections": "Get started with the New Relic CLI", + "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.", + "tags": "New Relic CLI", + "body": " Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead" }, - "id": "5f37af50196a67d8f955e63e" + "id": "5efa999c196a67c4e1766461" } ], "/automate-workflows/get-started-terraform": [ @@ -3449,7 +3423,7 @@ "external_id": "b69353439d3cc180ca46c64bef5e8470cdda1636", "image": "", "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/alerts-synthetic-monitoring", - "published_at": "2020-10-03T15:27:33Z", + "published_at": "2020-10-06T02:37:17Z", "updated_at": "2020-10-03T15:27:33Z", "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Using monitors", "document_type": "page", @@ -3458,7 +3432,7 @@ "body": "In order to provide a unified experience, we're deprecating Synthetics monitor alert notifications and alert conditions violations, and replacing these pages with a new synthetic monitor overview experience in New Relic One. This new experience provides visibility into a monitor's open violations and alert conditions with the monitor results in a single view, removing the need to open multiple tabs to view violations or alert conditions. For more information, check the EoL Announcements page. If you want to receive alert notifications when a synthetic monitor fails, you can configure the alert notification after you have created one. You can configure your monitor's alert condition via the Alerts UI. To identify which monitors do not have conditions assigned to them, review their color-coded health status. Add a synthetic monitor to alert policies A monitor can be included in multiple alert policies and conditions. You can view the alert policies and conditions for the selected monitor from the Alerts UI. To add an existing monitor to an alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate one or more alert policies where the monitor has not already been added. Open the policy, then click Add a condition. Click Synthetics and then select the monitor. Fill out the remaining settings and click Create condition. Adding a new alert condition to a Synthetics monitor can take up to 30 minutes. Linking and registration need to take place before you can open an alert for a monitor violation. Existing monitor: Remove from alert policy To remove an existing monitor's alert condition from an existing alert policy: Go to one.newrelic.com > Alerts & AI > Policies. From the list of existing alert policies, use the search box or scroll the list to locate and select an alert policy where the monitor has an alert condition that has already been added. Select the trash can (delete) icon on the monitor's alert condition. Receive alert notifications on a three-strike basis Synthetic alert monitors operate on a three-strike basis, registering a failure only after three monitor attempts from a single location return an error. Your alert policy configuration and notification channel settings will determine when you receive notifications for specific monitors and locations. If you monitor a non-public app and add your selected public minion IPs to your allow list, you may very infrequently receive a false downtime alert. When a synthetic monitoring data center goes down, New Relic may decide to temporarily use an alternate host, which results in the temporary server's IP being blocked by your app. Mute (disable) monitor's alert notifications To temporarily disable notifications for a monitor, mute it: Go to one.newrelic.com > Synthetics > Monitors > (select a monitor). Click General under the Settings menu in the left menu sidebar. Click the Notifications button to Off. Muting a monitor's alert notifications will not mute multi-location alerts or NRQL alerts. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 144.83583, + "_score": 137.46022, "_version": null, "_explanation": null, "sort": null, @@ -3507,7 +3481,7 @@ "body": "Incident orchestration is the alignment of teams, tools, and processes to prepare for incidents and outages in your software. The goal is to provide your teams a predictable framework and process to: Maximize efficiency in communication and effort. Minimize the overall impact to your business. Prerequisites Before starting this tutorial, be sure to complete these New Relic tutorials: Establish team dashboards Set up proactive alerting 1. Assign first responders to team dashboards Recommendation: For each team dashboard, make sure: It has an owner who assumes responsibility for the health of the applications and features it monitors. There is no ambiguity about who is responsible for attending to and resolving an alert condition. This policy will vary between organizations depending on size, structure, and culture. For example, some teams may prefer to assign dashboards and alerts based on de-facto features or application ownership. Other teams may prefer to adopt an on-call rotation (often referred to as \"pager duty\"). In on-call rotations, designated team members handle all first-line incident responses, and they resolve or delegate responsibilities based on predetermined incident thresholds. 2. Determine incident thresholds for alert conditions For each of your applications: Identify the thresholds for what is officially considered an incident. As you create alert policies with New Relic Alerts, make sure each set of threshold criteria is context-dependent. Document incident evaluation and known remediation procedures in runbooks. Include links to your runbooks when you define conditions and thresholds for your alert policies. For instance, a certain alert condition may be dismissable during low-traffic periods but require active remediation during peak hours. 3. Ensure alerts have auditable notification channels Recommendation: Make sure that communications during critical incidents take place in easily accessible and highly visible channels. A group chat room dedicated to incident communication is usually a great choice. This allows all stakeholders to participate or observe and provides a chronology of notifications, key decisions, and actions for postmortem analysis. Use any of the available notification channels in New Relic Alerts. For example, to set up a notification channel in Slack: Make sure your organization has completed New Relic's integration requirements with Slack. In the Slack app, select the dropdown in the top-left corner of the app, and select Customize Slack. Click Configure apps. From the list of app integrations, select New Relic. Expand the instructions for New Relic Alerts, and follow the steps to configure notifications from New Relic. 4. Automate triage and resolution steps Automation of simple or repeatable incident response tasks will increase efficiency and minimize the impact of incidents. With proper automation in place, you can disable or isolate faulty application components as soon as an alert threshold is reached, rather than after a notification has been issued. For example, a team managing an application for a digital media company wants to be able to remove commenting abilities from the website if the system has errors. In this case, they could: Add an endpoint to their front-end web application that will toggle a feature flag enabling or disabling the UI components associated with posting comments on an article. Create an alert policy with a threshold set on the sustained error rate in the commenting service. Assign a webhook notification channel that will send a POST request to this endpoint, as well as to the standard team notification channels. In this scenario, errors in the commenting system will trigger the webhook and remove the commenting UI from the website. Users can still use core functionality of the site without seeing errors generated by the commenting service. The application will maintain a stable but degraded state, allowing the team to focus on recovery without the pressure of preventing users from accessing the site. You can also use webhooks to create issues and action items in ticketing systems that have REST APIs, such as Zendesk. Use New Relic Alerts to create a webhook notification channel, and customize the webhook payload as needed. New Relic also provides integrations for some common ticketing systems. You can use any of the available integrations to file tickets from New Relic APM. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.55072, + "_score": 100.71797, "_version": null, "_explanation": null, "sort": null, @@ -3553,7 +3527,7 @@ "body": "You must save a new notification channel or any changes to an existing notification channel before testing it. Alerts will then send a test message to your chosen destination. Request the test To test a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Follow standard procedures to add a new notification channel or to update an existing notification channel, and save it. Select a notification channel, and then click Envelope Message Icon Send a test notification. Review the test confirmation message, and then click Got it. Troubleshoot the test results A confirmation message will automatically show up in the user interface that indicates where the test was sent (for example, email) and whether it was successful. Also, the test notification message itself includes detailed information, including: The person who requested the test Links to policies for the channel Links to all notification channels and policies for the account When troubleshooting problems, review the test notification message, and verify the setup requirements for the type of notification channel you selected. If necessary, make additional changes to your notification channel, and test it again as needed. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 83.77539, + "_score": 83.735916, "_version": null, "_explanation": null, "sort": null, @@ -3602,7 +3576,7 @@ "body": "Depending on the selected channel type, different values appear. Reference for updating channels Here's a quick reference for updating channels which also includes links to more detailed information and procedures. Add or remove policies assigned to a channel To add or remove policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Choose a channel, and then click Alert policies. From the selected policy, use the windows to select, remove, or clear all notification channels. Assign a channel to policies To add a notification channel to one or more policies: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies. Choose a policy, click Notification channels, and then click Add notification channels. Choose a channel, and then click Update policy. Change a channel's name To rename an existing notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details, change the name (maximum 64 characters) based on the channel type if applicable, and then save. Check for policies assigned to a user To check whether an account user has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Optional: Search by \"user\" to browse users or a specific username or email. Choose the user, then click Alert policies. Check how many policies are assigned to a channel To check whether a notification channel has any policies assigned: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. The Policy subscriptions column lists how many policies are assigned to the channel. Create more channels To create a new notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. Click New notification channel. Delete a channel To delete a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels. In the list, click the Delete icon. Test a saved channelView assigned alert policies To view the policies assigned to a notification channel: Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, choose a channel, and then click Alert policies. OR To view the notification channels assigned to a policy: Go to one.newrelic.com, in the top nav click Alerts & AI, click Policies, choose a policy, then click Notification channels. Basic process Go to one.newrelic.com, in the top nav click Alerts & AI, click Notification channels, then choose a channel. From the Channel details page, make any necessary changes, and then save. The user interface shows a Last modified time stamp for any changes to policies, including their conditions and notification channels. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 80.84828, + "_score": 80.833206, "_version": null, "_explanation": null, "sort": null, @@ -3655,7 +3629,7 @@ "body": "You can use alerts to set up notification channels, and attach those channels to policies. Your selected channels provide fast and consistent ways for the right personnel to be notified about incidents. For example, notifications allow you to include charts about the incident to provide context and share them with your team. Alerts offers several notification channels, including webhooks, Slack rooms, email, and more. You'll be notified by your notification channels when incidents are opened, acknowledged, or closed. This document explains the available notification channels and how to set them up. This document is about alerts notifications. For general information about unsubscribing from other New Relic emails, including marketing emails, weekly reports, and announcements, see Unsubscribe from New Relic emails. View notification channels To see all notification channels in your account: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. Add or remove notification channels To set up a new notification channel: On the Notification channels, click New notification channel. Select the type of channel and complete other required steps for it. To add or remove a notification policy or channel: Select a specific notification channel, select Alert policies, and add or remove a policy. OR Select a specific policy, select Notification channels, and add or remove a channel. Instructions for specific notification channels These are the available notification channel types. User For your convenience, we automatically load all users and their email addresses for the selected account. If your account has one or more sub-accounts, the notification channel includes only users for the currently selected master or sub-account. Use the User notification channel to select existing account team members and admins. To view the Users list or to add users to alert policies: Go to one.newrelic.com, in the top nav click Alerts & AI, then click Notification channels. A user channel also sends push notifications to any of the user's registered mobile devices. A device is registered if the user has logged into New Relic using the mobile app on the device. Email We automatically add every individual and their email address on the selected account to the User notification channel and you can select them there. You don't need to add existing New Relic accounts to the Email channel. To add an email channel for other users, follow these guidelines: Field Description Email (required) In general, use the Email notification channel to identify user emails or email aliases that are not already on the selected account. For example, if you have a dev-ops@company.com email alias for your DevOps team, add the email alias to the Email channel. Otherwise, use the User notification channel to select specific users on your DevOps team. For easier maintenance, add a single non-user email address or alias to a single alert notification channel. If you want to use the email channel for more than one email, create an email group or alias outside your account. These email addresses can be the same as or different from email addresses already on your account. Users can unsubscribe from general (non-alerts-related) emails, but they cannot unsubscribe from alerts email notifications. Instead, the account Owner, Admin, or add-on manager must remove users from the policy's email notification channel. Include JSON attachment (optional) To include a JSON attachment with the email notification, select this checkbox. OpsGenie You must have an existing OpsGenie account integrated with New Relic in order to provide the following information: Field Description Channel name (required) A meaningful name for the OpsGenie notification channel (maximum 64 characters). API key (required) The API key generated from your OpsGenie integration used to authenticate API requests. Teams (optional) List of team names that are responsible for the alert. OpsGenie runs team escalation policies to calculate which users will receive notifications. Tags (optional) A comma-separated list of labels attached to the alert. To overwrite the OpsGenie Quiet Hours setting for urgent alerts, add an OverwriteQuietHours tag. Recipients (optional) One or more names of users, groups, on-call schedules, escalation policies, etc., that OpsGenie uses to calculate where to send notifications. PagerDuty You must have an existing PagerDuty account in order to provide the following information: Field Description Service name (required) The name of your service integrating with PagerDuty for notifications. Integration key (required) The unique service identifier used by PagerDuty's Integration API to trigger, acknowledge, and resolve incidents for the service. Slack Before adding Slack notifications, you must create a unique webhook integration using Slack's New Relic integration. If you want web, transaction, server, and mobile alerts to be posted in separate channels, you must set up separate integrations for each one. Field Description Channel name (required) A meaningful name for the Slack notification channel (maximum 64 characters); for example, Network Ops Center. URL (required) Copy and paste the New Relic webhook integration URL that you've set up with Slack. For example: https://hooks.slack.com/services/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 Be sure to include https:// in the URL. Do not use http://. Team channel (optional) If used, include # before the name of the Slack channel where alert notifications are sent; for example, #NOC. VictorOps You must have an existing VictorOps account in order to provide the following required information: Field Description Channel name (required) A meaningful name for this notification channel (maximum 64 characters). For example, if the VictorOps Route key is for your Technical Support team, you could name this channel Tech Support - VictorOps. Key (required) VictorOps generates a unique key for each account. It maps the VictorOps account to its associated integrations. Route key (optional) This key maps the alert or incident to a specific team. Webhook Webhooks are HTTP POST messages containing JSON documents delivered to a destination URL. When an incident is opened, acknowledged, or closed, our webhook feature sends a message to your URL with any relevant information, such as a description of the event and a link back to New Relic. You also have the option to customize the payload in the POST message for further integration into your system. If your endpoint does not acknowledge the POST request within 10 seconds, the Alerts UI may indicate a failed notification event for the related incident. Before adding webhook notifications, you must have an endpoint set up to respond with a status code between 200 and 206 after receiving the following required information: Field Description Channel name (required) A meaningful name for the webhook (maximum 64 characters). Base url (required) The endpoint that will receive the POST message and trigger customized behaviors in your system. If you want to include a port number in the webhook URL, make sure the port is available for requests. Otherwise the webhook will not work. Basic auth (optional) To require basic authentication for the webhook, select Add basic auth, and provide the user name and password to authenticate the webhook. Custom headers (optional) To include headers with webhooks, select Add custom headers, and provide the name and value for each header. Use custom payload (optional) To use the default values, leave blank. To view and edit the default values, select Add custom payload. Payload (for custom payloads only) Your customized POST message code. This field includes: A list of variables you can use Syntax highlighting, based on payload type Payload type (for custom payloads only) Specify the message format: JSON (default) or Form. xMatters You must have an existing xMatters account in order to provide the following information: Field Description Channel name (required) Name your channel so you can identify it easily when associating it with a policy. Integration url (required) The unique integration url provided by xMatters pointing to your xMatters account. Receive mobile push notifications In order to receive mobile push notifications, your device must be registered and listed in (account) > User preferences. If the device is not listed in User preferences, log out of the app, log back in, and check again to see if it is listed. To receive mobile push notifications: Log in to your New Relic account via the mobile app at least once to ensure the device is registered. Add the user channel to the alert policy. Switch push notifications On for the device. Acknowledge alert notifications Anyone in your account can acknowledge notifications through the user interface or email notification. Acknowledging an incident in New Relic also acknowledges any associated incident in PagerDuty. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 79.12568, + "_score": 79.11005, "_version": null, "_explanation": null, "sort": null, @@ -3702,7 +3676,7 @@ "body": "This document contains tutorials on how to use NerdGraph to programmatically create and manage several types of New Relic keys. To build queries and see responses, use our GraphiQL explorer. For more information on our API keys, see API keys. Feature description NerdGraph's ApiAccess field can be used to programmatically create and manage the following types of keys: Personal API keys License keys, including: General license key used for APM Browser license key One common use case for this feature is the ability to create and manage license keys to let you rotate keys for security purposes. Note that you can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. General notes about this functionality: All mutations can accept multiple keys as arguments, and will return details about successful changes and errors. See examples below for details. All mutations (create, update and delete) will result in an NrAuditEvent that can be queried for auditing purposes. For details, see Audit events. Some notes about license keys: In the context of using NerdGraph, the license keys are referred to as ingest keys. This feature allows you to create up to 1,000 keys of each license key type, which allows for key rotation. You can't use this NerdGraph functionality to manage or delete your original license keys; you can only create additional license keys and manage the ones you've created. License keys created through NerdGraph can't be found in the New Relic UI. They're only queryable via the API. Some notes about personal API keys: In the context of using NerdGraph, personal API keys are referred to as user keys. User keys are displayed in various UI locations (for example: the User settings UI page). The examples below use license keys (ingest keys), but personal API keys (user keys) are queried in similar ways. We recommend you experiment with queries using the GraphiQL explorer. You can also create, view, and delete personal API keys using the UI. Create keys You can create multiple keys in a single mutation, for multiple accounts and key types. Note that the mutation can return successfully created keys as well as any errors encountered trying to create keys. Example of creating a key: mutation { apiAccessCreateKeys(keys: {ingest: {accountId: YOUR_ACCOUNT_ID, ingestType: BROWSER, name: \"Browser Key\", notes: \"A note.\"}}) { createdKeys { id key name accountId notes type ... on ApiAccessIngestKey { ingestType } } errors { message type ... on ApiAccessIngestKeyError { accountId errorType ingestType } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Update keys The update mutation takes the key ID, not the key string, to identify keys. mutation { apiAccessUpdateKeys(keys: {ingest: {keyId: KEY_ID, name: \"Updated name\", notes: \"A new note!\"}}) { updatedKeys { id key type name notes } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Delete keys The delete mutation takes the key ID, not the key string, to identify keys. Deleted keys will no longer grant access to New Relic systems and will no longer be returned by queries to the API access GraphQL API. mutation { apiAccessDeleteKeys(keys: {ingestKeyIds: INGEST_KEY_ID}) { deletedKeys { id } errors { message } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. Query keys You can access ingest and user keys by querying a single key or all keys, scoped to the actor. If querying for a single key, you must provide the key ID and type (INGEST or USER). Querying for multiple keys is done via a key search, which uses a mandatory types list and an optional scope to filter results. User keys belonging to other users will be obfuscated in the results. Single key example query: query { actor { apiAccess { key(id: INGEST_KEY_ID, keyType: INGEST) { key name type ... on ApiAccessIngestKey { ingestType } } } } } Key search example query: query { actor { apiAccess { keySearch(query: {types: INGEST, scope: {ingestTypes: BROWSER}}) { keys { name key type ... on ApiAccessIngestKey { ingestType } } } } } } Results will vary depending on your data. Use the GraphiQL explorer to experiment with mutations and queries. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 213.31656, + "_score": 207.15393, "_version": null, "_explanation": null, "sort": null, @@ -3753,7 +3727,7 @@ "body": "You can manage your policies, conditions, and muting rules programmatically using our GraphQL NerdGraph API. This is a powerful alternative to managing them in New Relic One or through the REST API. Alerts features you can manage with NerdGraph Here's what you can do in NerdGraph: Manage policies Use NRQL conditions Muting rules: suppress notifications The easiest way to discover alerts queries and mutations is through the NerdGraph API explorer. NerdGraph API explorer Our NerdGraph API explorer is a GraphiQL editor where you can prototype queries and mutations. Here are some examples showing how to find fields for queries and mutations. For general information about NerdGraph, see Introduction to NerdGraph. Queries To explore the various queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer: Mutations To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer: For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.7908, + "_score": 152.33849, "_version": null, "_explanation": null, "sort": null, @@ -3778,7 +3752,7 @@ "Build queries with NerdGraph", "Query data with NRQL" ], - "published_at": "2020-10-05T01:53:45Z", + "published_at": "2020-10-06T02:07:11Z", "title": "Collect data", "updated_at": "2020-10-05T01:53:44Z", "type": "developer", @@ -3789,7 +3763,7 @@ "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.9705, + "_score": 140.16779, "_version": null, "_explanation": null, "sort": null, @@ -3832,7 +3806,7 @@ "body": "This document provides examples of how to use New Relic NerdGraph to query and modify your cloud integration configuration data, including Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Using the NerdGraph GraphiQL explorer, you can also query NRQL data. These examples for querying cloud integration configuration data use GraphQL queries and mutations: Queries: requests that are intended to only fetch data Mutations: requests that create or update data on the server Requirements Before querying cloud integration data with NerdGraph, ensure you have: Followed the instructions to connect cloud integrations with New Relic. Created an API key. Access the NerdGraph GraphiQL explorer To access the NerdGraph GraphiQL explorer: Go to https://api.newrelic.com/graphiql. Add any of the following examples. Query examples Queries are requests that are intended to only fetch data (no side effects). Queries in NerdGraph are not static, meaning that you can ask for more or less data depending on your needs. For each query, you can specify exactly what data you want to retrieve, as long as it is supported by the schema. Available provider accounts This query returns a list of all provider accounts available in your infrastructure data. Depending on the provider, additional properties can be requested. For example, for GCP, you can also ask for the serviceAccountId property, which is needed when linking a new GCP project to New Relic. Anonymous: { actor { account(id: ) { cloud { providers { id name slug ... on CloudGcpProvider { serviceAccountId } } } } } } Named: query cloudProviders { actor { account(id: ) { cloud { providers { id name slug } } } } } Specific provider account information This query returns information about a specific provider account for your Amazon AWS integration. The properties id, name, slug are requested, along with a list of integrations available to be monitored. { actor { account(id: ) { cloud { provider(slug: \"aws\") { id slug name services { id slug name } } } } } } Specific integration data from a specific cloud provider This query returns information about a specific cloud service integration of a provider. In this example, the integration is the Amazon AWS ALB monitoring integration and the provider is AWS. The properties id, name, slug, and isAllowed are requested with the available configuration parameters. { actor { account(id: ) { cloud { provider(slug: \"aws\") { service(slug: \"alb\") { id name slug isEnabled } } } } } } List of enabled cloud accounts This query returns the list of cloud accounts enabled with your New Relic account. (Your cloud account associates your New Relic account and a specific provider account with your integration.) You can enable multiple cloud provider accounts in the same New Relic account, even with the same cloud provider. { actor { account(id: ) { cloud { linkedAccounts { id name createdAt provider { id name } } } } } } Specific linked account data This query returns information about a linked account, including the properties name, providerId, and a list of the cloud integrations enabled for monitoring. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integrations { id name createdAt updatedAt } } } } } } Enabled cloud integrations for all linked accounts This query returns all monitored integrations for all the provider cloud accounts. { actor { account(id: ) { cloud { linkedAccounts { name provider { id name } integrations { id name service { id name } createdAt updatedAt } } } } } } Specific cloud integration data for a specific linked account This query returns information about a specific integration from a specific linked account. { actor { account(id: ) { cloud { linkedAccount(id: ) { name provider { id name } integration(id: ) { id name service { id name } createdAt updatedAt } } } } } } Mutation examples Mutations are requests that are intended to have side effects, such as creating or updating data on the server. Mutations require the keyword mutation and the name of the mutation. NerdGraph mutations are restricted to a subset of all possible mutations. Link an account This mutation allows linking cloud provider accounts to a New Relic account, creating one or more linked accounts. It can link one specific cloud provider account (for example aws) to the New Relic account or multiple cloud provider accounts to one New Relic account. Required: The parameter is required and cannot be empty. It must be unique in your New Relic account. Other parameters are specific to the provider (AWS, GCP, and Azure) and are also required. In the following sections, you can see which parameters are required for each provider account. After linking an account the createdAt and updatedAt values are equal. mutation { cloudLinkAccount( accounts: { accountId: , aws: [{ name: , }] azure: [{ name: , }] gcp: [{ name: , }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link an Amazon AWS account This mutation links an Amazon AWS provider account to your New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } } Link a Microsoft Azure account This mutation links a Microsoft Azure cloud subscription to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { azure: [{ name: , applicationId: , clientSecret: , tenantId: , subscriptionId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Link a Google Cloud Platform (GCP) project This mutation links a GCP project to the New Relic account. mutation { cloudLinkAccount( accountId: , accounts: { gcp: [{ name: , projectId: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } } } Rename one or more cloud accounts This mutation allows you to rename one or more linked provider accounts. The name parameter is required, cannot be empty, and must be unique within your New Relic account. mutation { cloudRenameAccount( accountId: , accounts: [ { id: , name: }, { id: , name: } ] ) { linkedAccounts { id name } } } Enable an integration in a cloud account This mutation allows you to enable the monitoring of one or more specific cloud integrations in an existing cloud account. With this mutation, New Relic records data for the enabled integration from the provider account. For each provider account you have access to different input parameters, matching each available service. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , }] } } ) { integrations { id name integration { id slug } ... on SqsIntegration { awsRegions } } } } Enable an integration in multiple cloud accounts If you have many provider accounts linked, you can enable the same integration in the many cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name integration { id name } ... on SqsIntegration { awsRegions } } } } Enable multiple integrations in multiple cloud accounts If you have multiple cloud accounts linked, you can also enable multiple integrations in multiple linked cloud accounts at the same time. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] : [ { linkedAccountId: } ] }, : { : [ { linkedAccountId: }, { linkedAccountId: } ] } } ) { integrations { id name service { id name } ... on SqsIntegration { awsRegions } } } } Modify an integration's configuration (regions, polling intervals, etc.) This mutation also allows you to modify one or more cloud integrations and change one or more configuration parameters. Each service will have specific parameters that you can modify. For parameters of a type list (for example, awsRegion) supply the full list. For the output of the operation, you can use GraphQL fragments to ask for integration specific configuration parameters. mutation { cloudConfigureIntegration ( accountId: , integrations: { : { : [{ linkedAccountId: , metricsPollingInterval: , : , : , }] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval, , } } errors { type message } } } Disable (remove) an integration This mutation allows you to disable an integration and stop data collection for the specific cloud integration. mutation { cloudDisableIntegration ( accountId: , integrations: { : { : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id name authLabel provider { id } } errors { type message } } } Unlink account This mutation allows you to unlink cloud provider accounts from New Relic account. This action can not be undone. However, you can link the account again, but account history will still be lost. mutation { cloudUnlinkAccount ( accountId: , accounts: { { linkedAccountId: } } ) { unlinkedAccounts { id name } errors { type message } } } Enable an Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To enable an Amazon AWS integration: Send query to fetch account data Send a query to fetch data about the account, specifically available providers and already created provider accounts: { actor { account(id: ) { cloud { providers { id name slug } linkedAccounts { name integrations { id name } } } } } } Link AWS provider account Link an AWS provider account, if there is not one already linked or if you want to link another AWS account: Use your New Relic account identifier in the parameter. Provide a name for the provider account in the . Include the ARN of the AWS role used to fetch data from your AWS account. mutation { cloudLinkAccount( accountId: , accounts: { aws: [{ name: , arn: }] } ) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } } Enable Amazon AWS SQS integration Use your New Relic account ID in the parameter and the ID of the provider account in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: } ] } } ) { integrations { id name service { id name } } errors { type message } } } Enable integration in multiple provider accounts If you have multiple accounts with the same provider account, you can enable the same integration in multiple provider accounts at the same time. Use your New Relic account ID in the parameter and the ID of the provider accounts in the parameter value. mutation { cloudConfigureIntegration ( accountId: , integrations: { aws: { sqs: [ { linkedAccountId: }, { linkedAccountId: , configuration_param_1: value_1, configuration_param_2: value_2 } ] } } }) { integrations { id name service { id name } } errors { type message } } } Change polling interval for Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To change the polling interval of an AWS integration: Update the polling interval To update the polling interval for an Amazon AWS SQS integration, use your New Relic account ID in the parameter and the id of the linked provider account in the parameter value: mutation { cloudConfigureIntegration( accountId: , integrations: { aws : { sqs: [ { linkedAccountId: , metricsPollingInterval: 300 } ] } } ) { integrations { id name service { id slug } ... on SqsIntegration { metricsPollingInterval } } errors { type message } } } Disable Amazon AWS integration This example uses an Amazon AWS SQS integration and assumes you have connected an AWS account to New Relic. To disable an AWS integration: Disable the SQS integration Use your New Relic account identifier in the parameter and the ID of the linked cloud account the parameter value. mutation { cloudDisableIntegration ( accountId: , integrations: { aws: { sqs : [ { linkedAccountId: } ] } } ) { disabledIntegrations { id accountId name } errors { type message } } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.137344, + "_score": 120.20143, "_version": null, "_explanation": null, "sort": null, @@ -3889,7 +3863,7 @@ "body": "You can manage alerts conditions using our GraphQL NerdGraph API. Here are some conditions queries and mutations you can develop in our NerdGraph API explorer. See the NerdGraph introduction for help getting started with NerdGraph API explorer. This document covers the following: Steps to create a NRQL condition NRQL static condition NRQL baseline condition NRQL outlier condition Update a condition Update mutations List and filter NRQL conditions Singular NRQL condition queries Create a description Delete conditions Steps to create a NRQL condition Follow these steps: Decide which condition type you want to create (see NRQL Condition threshold types). Find your relevant policyID by doing one of the following: Use the NerdGraph policies API. Go to one.newrelic.com, in the top nav click Alerts & AI, then click Policies. Choose a policy. Find the ID under the policy name. Provide the appropriate mutation for your NRQL condition type and the relevant values. The NerdGraph GraphiQL explorer is the best place to find up-to-date documentation about the per-field specifics of the NerdGraph NRQL Conditions API. For example, questions like \"What does the valueFunction field accept?\" are best answered with the inline NerdGraph documentation. NRQL static condition Here's an example of creating a static condition: mutation { alertsNrqlConditionStaticCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS }) { id name } } NRQL baseline condition Here's an example of creating a baseline condition: mutation { alertsNrqlConditionBaselineCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Baseline Condition\" enabled: true baselineDirection: UPPER_ONLY nrql: { query: \"SELECT average(duration) FROM Transaction\" evaluationOffset: 3 } terms: { threshold: 13 thresholdDuration: 180 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name baselineDirection } } NRQL outlier condition Here's an example of creating an outlier condition: mutation { alertsNrqlConditionOutlierCreate(accountId: YOUR_ACCOUNT_ID, policyId: YOUR_POLICY_ID, condition: { name: \"Outlier Condition\" enabled: true expectedGroups: 4 openViolationOnGroupOverlap: false nrql: { query: \"SELECT average(duration) FROM Transaction FACET httpResponseCode\" evaluationOffset: 3 } terms: { threshold: 1 thresholdDuration: 300 thresholdOccurrences: ALL operator: ABOVE priority: CRITICAL } violationTimeLimit: TWENTY_FOUR_HOURS }) { id name expectedGroups openViolationOnGroupOverlap } } Update a condition Complete the following: Determine the type of your existing condition by requesting the type field in a nrqlConditionsSearch query like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id type } } } } } } The type returned is what you use for your update mutation. For example, if the type returned is STATIC, use alertsNrqlConditionStaticUpdate. If the type returned is BASELINE, use alertsNrqlConditionBaselineUpdate. If the type returned is OUTLIER, use alertsNrqlConditionOutlierUpdate. Provide the id of your condition to your relevant condition type mutation. Note that you can only update conditions of the relevant type. Only provide update mutations for the fields you want to update. Fields you don't provide in the update are not touched. Update mutations Only fields that you provide in the update are changed. In the following example, baselineDirection returns unchanged, but name is updated. mutation { alertsNrqlConditionBaselineUpdate(id: YOUR_CONDITION_ID, accountId: YOUR_ACCOUNT_ID, condition: { name: \"Your updated name\" }) { id name baselineDirection } } List and filter NRQL conditions To list or filter your NRQL conditions, use the nrqlConditionsSearch query in NerdGraph. Use cursor pagination The basic of list functionality for NRQL conditions allows you to paginate through your NRQL conditions as well as request the total count of conditions per account. The nrqlConditionsSearch query utilizes cursor pagination to paginate through resources. The idea behind cursor pagination is that the client will request a cursor in a programmatic loop until the cursor comes back empty. An initial list response will look something like this: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nextCursor nrqlConditions { id name type } totalCount } } } } } This example returns a JSON response like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nextCursor\": \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", \"nrqlConditions\": [ { \"id\": \"4432\", \"name\": \"Baseline Condition\", \"type\": \"BASELINE\" }, { \"id\": \"443\", \"name\": \"A static condition\", \"type\": \"STATIC\" }, // more conditions here in reality ], \"totalCount\": 435 } } } } }, } In order to paginate through conditions in the response, have the client request the cursor to be returned until the nextCursor returns from the response as null: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(cursor: \"WOwfJ4+TWm9QTFeKMGyg+w==:QqkI8S4+Wwnpno6z+uk8kQ==\", ) { nextCursor nrqlConditions { id name type } totalCount } } } } } Request type-specific fields Certain fields are only available on specific NRQL condition types. The main reason that mutations are split between the different condition types is because they have minor differences between the fields they accept. For example, valueFunction is only relevant for static NRQL conditions and baselineDirection is only relevant on baseline NRQL conditions. But if these fields are only available on these certain condition types, how do we return them in a list of all of our condition types? The answer is a GraphQL convention known as inline fragments. Inline fragments allow you to access the data on a specific type of NRQL condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch { nrqlConditions { id name type ...on AlertsNrqlStaticCondition { valueFunction } ...on AlertsNrqlBaselineCondition { baselineDirection } ...on AlertsNrqlOutlierCondition { expectedGroups } } } } } } } In the previous example query, we are asking GraphQL to do the hard work for us to determine which NRQL conditions are the correct type. So, when the returned type is a static condition, it will return the valueFunction in the object. When the returned type is a baseline condition, it will return baselineDirection instead, and when the type is an outlier condition, it will return expectedGroups. Here is an example response: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlConditionsSearch\": { \"nrqlConditions\": [ { \"baselineDirection\": \"UPPER_ONLY\", \"id\": \"342\", \"name\": \"My baseline condition\", \"type\": \"BASELINE\" }, { \"id\": \"553\", \"name\": \"My static condition\", \"type\": \"STATIC\", \"valueFunction\": \"SINGLE_VALUE\" }, { \"expectedGroups\": 4, \"id\": \"802\", \"name\": \"My outlier condition\", \"type\": \"OUTLIER\" } ] } } } } } } Filter NRQL conditions You can filter NRQL conditions with the searchCriteria argument of the nrqlConditionsSearch query: Here's an example of filtering NRQL conditions with matching by name. This query returns NRQL conditions that match the provided name. Note that this match is case insensitive. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditionsSearch(searchCriteria: { name: \"Baseline Condition\" }) { nrqlConditions { id name type } } } } } } Singular NRQL condition queries You can use the NRQL condition API to query for a singular condition. Run the nrqlCondition query in the alerts namespace. Similar to type specific fields on the nrqlConditionSearch query, you can also use these inline fragmentsto request fields that are restricted to a NRQL condition type. { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: YOUR_CONDITION_ID) { id name ...on AlertsNrqlStaticCondition { valueFunction } } } } } } Update the description This will walk you through the procedure to create a description for a NRQL alert condition. 1. Get all the conditions for a policy: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlConditions(policyId: YOUR_POLICY_ID) { nextCursor results { id name description enabled nrql { query sinceValue } policyId runbookUrl terms { duration operator priority timeFunction threshold } type violationTimeLimit } } } } } } 2. Get the details for a single condition: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: \"YOUR_CONDITION_ID\") { description id enabled name nrql { query evaluationOffset } policyId runbookUrl terms { operator priority threshold thresholdDuration thresholdOccurrences } type violationTimeLimit } } } } } 3. Create a mutation with the description. Here's an empty mutation template: mutation { alertsNrqlConditionStaticUpdate(accountId: YOUR_ACCOUNT_ID, id: \"YOUR_CONDITION_ID\", condition: {description: \"\"}) { description } } Here'a an example mutation with an included example description: mutation { alertsNrqlConditionStaticUpdate(accountId: 123456, id: \"123456\", condition: {description: \"timestamp : {{timestamp}} \\n accountId : {{accountId}} \\n type : {{type}} \\n event : {{event}} \\n description : {{description}} \\n policyId : {{policyId}} \\n policyName: {{policyName}} \\n conditionName : {{conditionName}} \\n conditionId : {{conditionId}} \\n product : {{product}} \\n conditionType : {{conditionType}} \\n RunbookUrl : {{runbookUrl}} \\n nrqlQuery : {{nrqlQuery}} \\n nrqlEventType : {{nrqlEventType}} \\n targetID : {{targetId}} \\n targetName : {{targetName}} \\n commandLine : {{tag.commandLine}} \\n entityGuid : {{tag.entityGuid}} \\n entityName : {{tag.entityName}} \\n fullHostname : {{tag.fullHostname}} \\n instanceType : {{tag.instanceType}} \\n processDisplayName : {{tag.processDisplayName}}\"}) { description } } Delete conditions You can use the alertsConditionDelete mutation to delete any type of condition. You can only request the id field on a delete mutation; for example: mutation { alertsConditionDelete(accountId: YOUR_ACCOUNT_ID, id: YOUR_CONDITION_ID) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.665276, + "_score": 118.73534, "_version": null, "_explanation": null, "sort": null, @@ -3903,572 +3877,863 @@ "id": "5f2dee1128ccbc562e88dfc1" } ], - "/explore-docs/nerdpack-file-structure": [ + "/build-apps/permission-manage-apps": [ + { + "category_2": "Original users and roles", + "nodeid": 1101, + "sections": [ + "Original accounts and billing", + "Original product-based pricing", + "Original users and roles", + "SAML SSO (original users)", + "Original data retention", + "Original pricing plan usage", + "Users and roles (original user model)", + "View and manage users", + "User types: basic user and full user", + "Account roles", + "Add-on roles", + "Account permissions", + "Alert permissions", + "APM permissions", + "Browser permissions", + "Infrastructure permissions", + "Insights permissions", + "Mobile permissions", + "Synthetics permissions", + "Workloads", + "For more help" + ], + "title": "Users and roles (original user model)", + "category_0": "New Relic accounts", + "type": "docs", + "category_1": "Original accounts and billing", + "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "image": "", + "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", + "published_at": "2020-10-03T17:04:51Z", + "updated_at": "2020-10-03T17:04:51Z", + "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "document_type": "page", + "popularity": 1, + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 148.51236, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Account permissions", + "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", + "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" + }, + "id": "5f3e194028ccbc18c7f56de3" + }, + { + "category_2": "Get started", + "nodeid": 11261, + "sections": [ + "Amazon integrations", + "Get started", + "AWS integrations list", + "Troubleshooting", + "Integrations and managed policies", + "Recommended policy", + "Optional policy", + "Option 1: Use our CloudFormation template", + "Option 2: Manually add permissions", + "For more help" + ], + "title": "Integrations and managed policies", + "category_0": "Integrations", + "type": "docs", + "category_1": "Amazon integrations", + "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", + "published_at": "2020-10-03T15:15:43Z", + "updated_at": "2020-10-03T15:15:43Z", + "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "document_type": "page", + "popularity": 1, + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 101.89833, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Integrations and managed policies", + "sections": "Option 2: Manually add permissions", + "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", + "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" + }, + "id": "5d6c1f4828ccbce6928f6fe0" + }, { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", "sections": [ + "Build apps", + "Guides to build apps", "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Add a time picker to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "document_type": "page", + "popularity": 1, + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 92.49929, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Build apps", + "sections": "Permissions for managing applications", + "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + }, + "id": "5efa999d64441fc0f75f7e21" + }, + { + "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", + "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", + "sections": [ + "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "About this Learncast", + "Prerequisites", + "Virtual Training Session List" + ], + "published_at": "2020-10-06T01:58:38Z", + "title": "Live Learncast: New Relic One Programmability", + "updated_at": "2020-07-31T01:40:49Z", + "type": "", + "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", + "popularity": 1, + "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 89.23802, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", + "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" + }, + "id": "5dc618cbe7b9d2a0a8e4649c" + }, + { + "sections": [ + "Serve, publish, and deploy your New Relic One app", "Before you begin", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "Create a \"Hello, World!\" application", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-06T02:17:18Z", + "updated_at": "2020-09-02T02:05:55Z", + "document_type": "page", + "popularity": 1, + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 76.843124, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Add images and metadata to your apps", + "info": "Start sharing and using the custom New Relic One apps you build", + "tags": "publish apps", + "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" + }, + "id": "5efa999de7b9d283e67bab8f" + } + ], + "/automate-workflows/kubernetes-helm-deployment": [ + { + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/", + "sections": [ + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" + ], + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", + "type": "developer", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "document_type": "page", + "popularity": 1, + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 6307.5156, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment" + }, + "id": "5efa999c196a67dfb4766445" + }, + { + "category_2": "Private locations", + "nodeid": 23821, + "sections": [ + "Synthetic monitoring", + "Getting started", + "Guides", + "Using monitors", + "Monitor scripting", + "Administration", + "Private locations", + "UI pages", + "Synthetics API", + "Troubleshooting", + "Install containerized private minions (CPMs)", + "General private minion features", + "Kubernetes-specific features", + "System requirements and compatibility", + "Private location key", + "Sandboxing and Docker dependencies", + "Install and update CPM versions", + "Start the CPM", + "Stop or delete the CPM", + "Show help and examples", + "Show license information", + "Configure CPM", + "Networks", + "Security, sandboxing, and running as non-root", + "Docker image repository", + "Additional considerations for CPM connection", + "For more help" ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-08-21T01:45:19Z", + "title": "Install containerized private minions (CPMs)", + "category_0": "Synthetic monitoring", + "type": "docs", + "category_1": "Synthetic monitoring", + "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", + "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", + "published_at": "2020-10-04T00:01:41Z", + "updated_at": "2020-08-13T23:22:19Z", + "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", "document_type": "page", "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 418.36847, + "_score": 114.24807, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "Nerdpack file structure", - "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" + "sections": "Using monitors", + "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", + "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" }, - "id": "5efa9973196a67d16d76645c" + "id": "5f31d981196a678103fbd731" }, { + "category_2": "Enable log monitoring", + "nodeid": 34166, "sections": [ - "New Relic One CLI reference", - "Installing the New Relic One CLI", - "Tip", - "New Relic One CLI Commands", - "Get started", - "Configure your CLI preferences", - "Set up your Nerdpacks", - "Manage your Nerdpack subscriptions", - "Install and manage plugins", - "Manage catalog information" - ], - "title": "New Relic One CLI reference", - "type": "developer", - "tags": [ - "New Relic One app", - "nerdpack commands" + "Enable log management", + "New Relic Logs", + "Enable log monitoring", + "Configure logs in context", + "Logs in context for Go", + "Logs in context for Java", + "Logs in context for .NET", + "Logs in context for Node.js", + "Logs in context for PHP", + "Logs in context for Python", + "Logs in context for Ruby", + "Logs in context with agent APIs", + "Kubernetes plugin for log forwarding", + "Requirements", + "Enable Kubernetes for logs management", + "View log data", + "What's next?", + "For more help" ], - "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", - "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", - "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-09-17T01:51:10Z", + "title": "Kubernetes plugin for log forwarding", + "category_0": "Log management", + "type": "docs", + "category_1": "Enable log management", + "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "image": "", + "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", + "published_at": "2020-10-04T02:40:10Z", + "updated_at": "2020-09-27T16:17:57Z", + "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", "document_type": "page", "popularity": 1, - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 328.8902, + "_score": 111.94618, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI reference", - "sections": "New Relic One CLI reference", - "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", - "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "sections": "New Relic Logs", + "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", + "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" }, - "id": "5efa989e28ccbc535a307dd0" + "id": "5f37c1d064441f0d21a0a5e1" }, { + "category_2": "Get started", + "nodeid": 27301, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "Kubernetes integration", + "Get started", + "Installation", + "Understand and use data", + "Link apps and services", + "Kubernetes events", + "Logs", + "Troubleshooting", + "Introduction to the Kubernetes integration", + "Get started: Install the Kubernetes integration", + "Why it matters", + "Navigate all your Kubernetes events", + "Bring your cluster logs to New Relic", + "Check the source code", + "For more help" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-05T01:53:44Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Introduction to the Kubernetes integration", + "category_0": "Integrations", + "type": "docs", + "category_1": "Kubernetes integration", + "external_id": "4ad996d529753d173874d752239ece44c8e6d43f", + "image": "", + "url": "https://docs.newrelic.com/docs/integrations/kubernetes-integration/get-started/introduction-kubernetes-integration", + "published_at": "2020-10-06T02:13:51Z", + "updated_at": "2020-08-05T01:57:55Z", + "breadcrumb": "Contents / Integrations / Kubernetes integration / Get started", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", + "body": "New Relic's Kubernetes integration gives you full observability into the health and performance of your environment, no matter whether you run Kubernetes on-premises or in the cloud. With our cluster explorer, you can cut through layers of complexity to see how your cluster is performing, from the heights of the control plane down to applications running on a single pod. one.newrelic.com > Kubernetes cluster explorer: The cluster explorer is our powerful, fully visual answer to the challenges associated with running Kubernetes at a large scale. You can see the power of the Kubernetes integration in the cluster explorer, where the full picture of a cluster is made available on a single screen: nodes and pods are visualized according to their health and performance, with pending and alerting nodes in the innermost circles. Predefined alert conditions help you troubleshoot issues right from the start. Clicking each node reveals its status and how each app is performing. Get started: Install the Kubernetes integration We have an automated installer to help you with many types of installations: servers, virtual machines, and unprivileged environments. It can also help you with installations in managed services or platforms, but you'll need to review a few preliminary notes before getting started. Here's what the automated installer does: Asks for the cluster name and namespace of the integration. Asks for additional setup options, such as Kube state metrics. Asks for the installation method: manifest file or Helm. Generates either the manifest or Helm chart. Read the install docs Start the installer If your New Relic account is in the EU region, access the automated installer from one.eu.newrelic.com. Why it matters Governing the complexity of Kubernetes can be challenging; there's so much going on at any given moment, with containers being created and deleted in a matter of minutes, applications crashing, and resources being consumed unexpectedly. Our integration helps you navigate Kubernetes abstractions across on-premises, cloud, and hybrid deployments. In New Relic, you can build your own charts and query all your Kubernetes data, which our integration collects by instrumenting the container orchestration layer. This gives you additional insight into nodes, namespaces, deployments, replica sets, pods, and containers. one.newrelic.com > Dashboards: Using the chart builder you can turn any query on Kubernetes data to clear visuals. With the Kubernetes integration you can also: Link your APM data to Kubernetes to measure the performance of your web and mobile applications, with metrics such as request rate, throughput, error rate, and availability. Monitor services running on Kubernetes, such as Apache, NGINX, Cassandra, and many more (see our tutorial for monitoring Redis on Kubernetes). Create new alert policies and alert conditions based on your Kubernetes data, or extend the predefined alert conditions. These features are in addition to the data New Relic already reports for containerized processes running on instrumented hosts. Navigate all your Kubernetes events The Kubernetes events integration, which is installed separately, watches for events happening in your Kubernetes clusters and sends those events to New Relic. Events data is then visualized in the cluster explorer. To set it up, check the Kubernetes events box in step 3 of our install wizard, or follow the instructions. one.newrelic.com > Kubernetes cluster explorer > Events: Browse and filter all your Kubernetes events, and dig into application logs and infrastructure data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check the source code This integration is open source software. That means you can browse its source code and send improvements, or you can create your own fork and build it. For more information, see the README. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 287.19748, + "_score": 97.35381, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Import additional modules from New Relic One", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "sections": "Bring your cluster logs to New Relic", + "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", + "body": " data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check" }, - "id": "5efa993c196a67066b766469" + "id": "5cf9564164441f8f472a9169" }, { + "image": "https://developer.newrelic.com/static/kubecon-europe-2020-b989ec0e7b4ed71a89666c35fe934433.jpg", + "url": "https://developer.newrelic.com/kubecon-europe-2020/", "sections": [ - "Set up your development environment", - "Before you begin", - "A note on support", - "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" - ], - "title": "Set up your development environment", + "KubeCon and CloudNativeCon Europe 2020", + "New Relic welcomes you at Virtual Kubecon and CloudNativeCon Europe 2020!", + "Attend one of our lightning talks", + "Note", + "We handle Prometheus, you keep Grafana", + "How to use and customize Helm charts", + "Kubernetes observability with context", + "What is OpenTelemetry and how to get started?", + "OpenTelemetry Architecture", + "Kubernetes in the wild: best practices", + "Want some action now? Check out the following videos!", + "How to use the Kubernetes cluster explorer", + "What is OpenTelemetry?", + "Connecting Prometheus and Grafana to New Relic" + ], + "published_at": "2020-10-06T02:14:19Z", + "title": "New Relic Developers", + "updated_at": "2020-08-15T01:43:38Z", "type": "developer", - "tags": [ - "developer account", - "API key", - "New Relic One CLI" - ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-08-26T01:47:20Z", + "external_id": "53cb6afa4f4062ba359559e9fb3bb2406ece2ad4", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "body": "KubeCon and CloudNativeCon Europe 2020 New Relic welcomes you at Virtual Kubecon and CloudNativeCon Europe 2020! Learn more about the New Relic One platform, the only observability platform that provides open, connected and programmable observability for cloud-native environments. Join us to dive into the New Relic One platform and our Kubernetes cluster explorer. Register here Attend one of our lightning talks Note Go to the virtual expo tab, and find New Relic in Silver Hall B to attend a lightning talk. We handle Prometheus, you keep Grafana Mon Aug 17 @ 14:35 CEST Samuel Vandamme How to use and customize Helm charts Mon Aug 17 @ 16:25 CEST Douglas Camata Kubernetes observability with context Tue Aug 18 @ 15:05 CEST Stijn Polfliet What is OpenTelemetry and how to get started? Tue Aug 18 @ 17:15 CEST Lavanya Chockaligam How to use and customize Helm charts Wed Aug 19 @ 15:05 CEST Douglas Camata OpenTelemetry Architecture Wed Aug 19 @ 16:25 CEST John Watson Kubernetes in the wild: best practices Thu Aug 20 @ 15:05 CEST Martin Fuentes Kubernetes observability with context Thu Aug 20 @ 16:50 CEST Stijn Polfliet Want some action now? Check out the following videos! How to use the Kubernetes cluster explorer What is OpenTelemetry? Connecting Prometheus and Grafana to New Relic", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 282.9924, + "_score": 93.99533, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" + "title": "New Relic Developers", + "sections": "How to use and customize Helm charts", + "body": " to use and customize Helm charts Mon Aug 17 @ 16:25 CEST Douglas Camata Kubernetes observability with context Tue Aug 18 @ 15:05 CEST Stijn Polfliet What is OpenTelemetry and how to get started? Tue Aug 18 @ 17:15 CEST Lavanya Chockaligam How to use and customize Helm charts Wed Aug 19 @ 15:05 CEST" }, - "id": "5efa9973e7b9d242237bab39" - }, + "id": "5f373dcae7b9d20949909274" + } + ], + "/explore-docs/query-and-store-data": [ { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" - ], - "published_at": "2020-10-05T01:56:44Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", + "Intro to NerdStorage", + "Use NerdStorage in your apps", + "Data model", + "Limits", + "Data access", + "Permissions for working with NerdStorage" + ], + "title": "Intro to NerdStorage", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "tags": [ + "nerdstorage", + "nerdstorage components", + "new relic one apps", + "data access" + ], + "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", + "published_at": "2020-10-06T02:13:00Z", + "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "info": "Intro to NerdStorage on New Relic One", + "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 279.2313, + "_score": 134.44003, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" + "tags": "nerdstorage components", + "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" }, - "id": "5f28bd6ae7b9d267996ade94" - } - ], - "/automate-workflows/get-started-kubernetes": [ + "id": "5efa989ee7b9d2048e7bab92" + }, { + "category_2": "Java agent release notes", + "nodeid": 11976, + "sections": [ + "APM agent release notes", + "Go agent release notes", + "Java agent release notes", + ".NET agent release notes", + "Node.js agent release notes", + "PHP agent release notes", + "Python agent release notes", + "Ruby agent release notes", + "C SDK release notes", + "Java Agent 3.36.0", + "Improvements", + "Fixes" + ], + "title": "Java Agent 3.36.0", + "category_0": "Release notes", + "type": "docs", + "category_1": "APM agent release notes", + "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", + "published_at": "2020-10-03T17:31:36Z", + "updated_at": "2018-04-14T23:39:35Z", + "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", + "document_type": "release_notes", + "popularity": -2, + "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", + "info": "", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 46.517246, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" + }, + "id": "58a53cf38e9c0f755a81db4e" + }, + { + "category_2": "API guides", + "nodeid": 11521, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "Java agent", + "Getting started", + "Installation", + "Additional installation", + "Heroku", + "Configuration", + "Attributes", + "Features", + "Instrumentation", + "Custom instrumentation", + "API guides", + "Async instrumentation", + "Troubleshooting", + "Guide to using the Java agent API", + "Use the API", + "Transactions", + "Instrument asynchronous work", + "Implement distributed tracing", + "Implement cross application tracing", + "Obtain references to New Relic entities", + "Additional API functionality", + "Additional API usage examples", + "For more help" ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "Guide to using the Java agent API ", + "category_0": "APM agents", + "type": "docs", + "category_1": "Java agent", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", + "published_at": "2020-10-03T17:13:08Z", + "updated_at": "2020-09-03T11:06:02Z", + "breadcrumb": "Contents / APM agents / Java agent / API guides", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 127.51088, + "_score": 31.976206, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using the Kubernetes operator", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" + "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" }, - "id": "5efa999c196a67dfb4766445" + "id": "5a3137f4e621f4576cf1e35f" }, { - "category_2": "Alert conditions", - "nodeid": 9231, + "category_2": "PHP agent API", + "nodeid": 11821, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", + "PHP agent", + "Getting started", + "Installation", + "Advanced installation", + "Configuration", + "API guides", + "PHP agent API", + "Attributes", + "Features", + "Frameworks and libraries", "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "newrelic_add_custom_tracer", + "Requirements", + "Description", + "Parameters", + "Return value(s)", + "Example(s)", + "Instrument a function", + "Instrument a method within a class", + "Instrument a method within a namespaced class", "For more help" ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", + "title": "newrelic_add_custom_tracer (PHP agent API)", + "category_0": "APM agents", "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-10-04T08:33:54Z", - "updated_at": "2020-10-04T08:33:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", - "document_type": "page", + "category_1": "PHP agent", + "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", + "image": "", + "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", + "published_at": "2020-10-03T17:22:37Z", + "updated_at": "2019-09-30T22:55:59Z", + "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", + "document_type": "api_doc", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 113.33452, + "_score": 26.0898, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Create NRQL alert conditions", - "sections": "Create NRQL alert conditions", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "sections": "Instrument a method within a class", + "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", + "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "58ca4191e621f45edd466e7a" }, { - "category_2": "Alerts release notes", - "nodeid": 40776, + "nodeid": 9691, "sections": [ - "New Relic Platform release notes", - "Alerts release notes", - "APM release notes", - "Cloud Integrations release notes", - "Diagnostics release notes", - "Mobile release notes", - "Kubernetes integration release notes", - "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "Component: NRQL Conditions (Review Required)", - "Announcing : New Relic One Streaming Alerts", - "Please read the full announcement and FAQ here , and follow the links to enroll." + "Introduction to New Relic Mobile (Unity)", + "Contents", + "Monitor mobile app performance", + "Install and configure", + "Use Unity SDK API", + "Send custom events and attributes to Insights", + "Track custom network requests", + "Uninstall plugin", + "Unity release notes", + "For more help" ], - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_0": "Release notes", + "title": "Introduction to New Relic Mobile (Unity)", "type": "docs", - "category_1": "New Relic Platform release notes", - "external_id": "74ae41c7360962287ea605016bf7731035382166", + "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/platform-release-notes/alerts-release-notes/09-28-2020-action-required-new-relic-one-streaming-alerts-nrql-conditions", - "published_at": "2020-10-03T14:38:29Z", - "updated_at": "2020-09-29T22:06:08Z", - "breadcrumb": "Contents / New Relic Platform Release Notes / Alerts release notes", - "document_type": "release_notes_platform", + "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", + "published_at": "2020-10-04T04:12:22Z", + "updated_at": "2020-07-25T00:44:01Z", + "breadcrumb": "Contents", + "document_type": "page", "popularity": 1, - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next year, all alert condition types will be consolidated into NRQL conditions. New Relic One Streaming Alerts delivers: More reliable alerting that is far less susceptible to data latency and processing lag. Increased accuracy of the data points that are being evaluated Reduced time-to-detect through improvements in the streaming algorithm, and configurable aggregation duration. Greater control over the signals being monitored. You can specify how to evaluate signal gaps, when to consider a signal as lost, and what actions should be taken. Consistent behavior and configuration of Alert conditions regardless of the telemetry type, source of the signal being monitored, or specifics of your NRQL query. Increased scalability in the number of time series that an Alert Condition can monitor and in the total number of conditions that can be configured ** Action Required : Opt-in Migration ** When we roll out this new streaming platform, there is a change in behavior related to how we process aggregation time windows that do not have data. If you are monitoring for when a signal goes to “0” in order to determine if an entity stops reporting, this approach will no longer work after moving to the new platform. To maintain this functionality you must enable Loss of Signal detection on these conditions in advance of moving your account in order to prevent false negatives. You may opt-in to this new platform now. Read more about the rollout plan in the FAQ section below. Please read the full announcement and FAQ here , and follow the links to enroll. When is this available? You can opt-in to enable New Relic Streaming Alerts on NRQL conditions right now. We plan to enable the majority of accounts the week of October 5th. Accounts that have NRQL Conditions that may be monitoring for loss of signal will not be enabled automatically until October 28th. These are NRQL Conditions that either use the “Less Than” operator, or have an operator and threshold of “Equals 0”. During the initial roll out the week of October 5th, you will see a banner on the top of the policy page and the NRQL Conditions create/edit page that will indicate whether your account has been enabled or whether you must update your configurations and opt-in.", + "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 88.10164, + "_score": 17.185205, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "sections": "09-28-2020 : Action Required : New Relic One Streaming Alerts for NRQL Conditions", - "category_2": "Alerts release notes", - "body": "[RSS] Released on:  September 28, 2020 Component: NRQL Conditions (Review Required) Announcing : New Relic One Streaming Alerts New Relic is rolling out a new, unified streaming alerts platform for New Relic One. This new streaming alerts platform will power NRQL Alert Conditions, and over the next" + "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" }, - "id": "5f735c6964441f8a6aeb7297" - }, + "id": "5c52cbec8e9c0f0b286080ec" + } + ], + "/explore-docs/nerdpack-file-structure": [ { - "category_2": "Alert conditions", - "nodeid": 7261, "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Set thresholds for an alert condition", - "What is a threshold?", - "View and set thresholds", - "For more help" + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" ], - "title": "Set thresholds for an alert condition", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "external_id": "3b8b9a21021955bde8536ec49e7348f9bc1b6307", - "image": "", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "published_at": "2020-10-03T18:47:38Z", - "updated_at": "2020-09-30T13:34:48Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-06T02:07:12Z", + "updated_at": "2020-08-21T01:45:19Z", "document_type": "page", "popularity": 1, - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "body": "When you create a condition, you set thresholds that determine what will open a violation. This document explains what thresholds are and how to set them. What is a threshold? For a condition, thresholds are the settings that determine what opens a violation. Depending on a policy's incident preference, a violation may result in: The creation of an incident. Notifications being sent. Examples of thresholds: An application’s average web response time is greater than 5 seconds for 15 minutes. An application’s error rate per minute hits 10% or higher at least once in an hour. An application’s AJAX response time deviates a certain amount from its expected baseline behavior. Besides a mandatory critical threshold level, you can also set thresholds for a less serious warning level, which doesn't generate an incident or send a notification. View and set thresholds Thresholds are set during the process of creating a condition: Goal Instructions Set thresholds for a new condition Set thresholds as part of the process of creating a condition. View and update thresholds for existing conditions To view a condition’s thresholds: find that condition in the UI. To update thresholds, select a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set thresholds for two levels: critical (required) and warning (optional). Threshold level Details Critical (red) Required. When a violation occurs, it will send notifications depending on incident preference settings. Warning (yellow) Optional. Doesn't generate notifications. Use a warning threshold when you want to monitor when a system behavior is concerning or noteworthy but not important enough to require a notification. Loss of signal (NRQL only) A loss of signal is a period of time when no data is received by New Relic. This could be the result of an entity or service going offline, an issue with an agent or collector, or networking problems in a data center or the internet. You can use loss of signal detection to create a new violation and notification if a signal stops and you expect a service to be stable. You may also want to use this to determine when an ephemeral service stops and set the action to close any open violations that exist for this condition. To learn more about signal loss, gap filling, and how to request access to these features, see this announcement. Set time intervals Different condition types have different minimum time intervals. For example, some condition types have a minimum time interval of 5 minutes (for example, APM metric alert conditions), and others have a minimum time interval of 1 minute (for example, NRQL alert conditions). Set URL for runbook instructions For how to set this via the UI, see Runbook instructions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 81.92566, + "_score": 413.16742, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Set thresholds for an alert condition", - "sections": "Alert conditions", - "info": "In Alerts, thresholds are what determines when a condition will trigger a violation.", - "category_0": "Alerts and Applied Intelligence", - "category_1": "New Relic Alerts", - "category_2": "Alert conditions", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition", - "body": " a condition’s thresholds and make changes. To learn more about specific alert condition types (like baseline and NRQL), see Types of conditions. Details about other functionality and rules: Use the Alerts API You can list and edit conditions with the Alerts API. Set optional warning level You can set", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions" + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "Nerdpack file structure", + "body": "!" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit" }, - "id": "5f2d847c64441fc0a656a98a" + "id": "5efa9973196a67d16d76645c" }, { - "category_2": "New Relic One pricing and users", - "nodeid": 39496, "sections": [ - "Accounts and billing", - "Account setup", - "Account structure", - "New Relic One pricing and users", - "General account settings", - "Automated user management", - "Partner install", - "Query and alert on usage data", - "Data types", - "Query examples", - "Data usage queries", - "User count queries", - "Set usage alerts", - "General attributes", - "For more help" + "New Relic One CLI reference", + "Installing the New Relic One CLI", + "Tip", + "New Relic One CLI Commands", + "Get started", + "Configure your CLI preferences", + "Set up your Nerdpacks", + "Manage your Nerdpack subscriptions", + "Install and manage plugins", + "Manage catalog information" ], - "title": "Query and alert on usage data", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Accounts and billing", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "external_id": "94429d3c0366a8dee43d771c143fc6dacf4c4e31", - "image": "", - "url": "https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "published_at": "2020-10-03T15:47:18Z", - "updated_at": "2020-10-03T15:47:18Z", - "breadcrumb": "Contents / New Relic accounts / Accounts and billing / New Relic One pricing and users", + "title": "New Relic One CLI reference", + "type": "developer", + "tags": [ + "New Relic One app", + "nerdpack commands" + ], + "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", + "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", + "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage. Note that account hierarchy may affect queried data. See Account structure. Data types Usage data is attached to two events: NrConsumption records usage every hour, and is the equivalent of \"real-time\" usage. Use this event to observe usage trends over time. NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost for a billing period. To look at changes made to your New Relic account, you can query NrAuditEvent. Query examples The usage UI displays your data usage and billable user count. But to get more detail, you can use these NRQL queries. For definitions of some of the attributes used in these queries, see Attributes. Data usage queries Here are some data usage query examples: Daily data usage This query totals your billable ingested data, and displays a daily value for the past three months: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago TIMESERIES 1 day Daily usage by source This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE 3 months ago FACET usageMetric TIMESERIES 1 day Month-to-date data usage This query shows the current full user count. In other words, it shows how much you'd be billed for your data for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' SINCE this month Month-to-date estimated data cost This query shows the estimated cost of your ingested data: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month User count queries Here are some user-related query examples. For details on how users are counted, see User count calculations. Month-to-date full users This query shows the billable full users for the month. In other words, it shows how much you'd be billed for your users for that month if you were billed right now. FROM NrMTDConsumption SELECT latest(usersBillable) SINCE this month This query shows how many full users were counted by hour. This is useful for seeing how the full user count changed over time. from NrConsumption SELECT max(FullUsers) SINCE 10 days ago TIMESERIES 1 hour Projected monthly full user count This query shows a projected count of monthly users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month: FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days) SINCE '2020-09-01' Count full users and basic users The usage UI shows the count of full users and basic users. The query used is: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric To see the count of full and basic users over time: FROM NrUsage SELECT max(usage) SINCE 10 days ago WHERE productLine='FullStackObservability' WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour Set usage alerts To help manage your billable data, you can set alerts to notify you of unexpected increases in usage. To learn about how to create alerts, see Alert workflow. When creating alert conditions, we recommend 20 minutes for the alert window value and the evaluation offset value. This will ensure it won't alert on normal gaps between usage event generation. Here are some NRQL alert condition examples. For attribute definitions, see Attributes. Ingested gigabytes exceed a fixed value This query will create an alert when your hourly usage exceeds a fixed value: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' If you have multiple sub-accounts, you may want to set threshold alerts for a specific subaccount: FROM NrConsumption SELECT sum(GigabytesIngested) WHERE productLine = 'DataPlatform' AND consumingAccountId = YOUR_SUB-ACCOUNT_ID Usage exceeds fixed threshold for GBs This query will create an alert when your usage exceeds fixed monthly threshold for GBs: FROM NrMTDConsumption SELECT latest(GigabytesIngested) WHERE productLine = 'DataPlatform' Usage exceeds fixed threshold for users This query will create an alert when your usage exceeds fixed monthly threshold for billable users: FROM NrMTDConsumption SELECT latest(usersBillable) Usage exceeds fixed threshold for estimated cost This query will create an alert when your usage exceeds fixed threshold for estimated cost: FROM NrMTDConsumption SELECT latest(estimatedCost) WHERE productLine = 'DataPlatform' SINCE this month General attributes These attributes are attached to the NrMTDConsumption and NrConsumption events. Attribute Description productLine The category of usage. There are four options: DataPlatform, FullStackObservability, IncidentIntelligence, or ProactiveDetection. For more details about these categories, see New Relic platform. metric Consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. consumingAccountId ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used. estimatedCost Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 66.693756, + "_score": 321.2166, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query and alert on usage data", - "sections": "Query and alert on usage data", - "info": "How to create queries and alerts for your New Relic billing-related usage. ", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/accounts/accounts-billing/new-relic-one-pricing-users/usage-queries-alerts", - "body": "For accounts on our New Relic One pricing plan, we provide a UI for understanding your New Relic usage and managing your data. Additionally, you can: Query your usage data to get more detail than is available in the UI Set up NRQL alert conditions to get notifications about changes in your usage" + "title": "New Relic One CLI reference", + "sections": "New Relic One CLI reference", + "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", + "tags": "New Relic One app", + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, - "id": "5f22f5bd64441f0c9e2a48ea" - } - ], - "/build-apps/build-hello-world-app": [ + "id": "5efa989e28ccbc535a307dd0" + }, { "sections": [ - "Intro to New Relic One API components", - "Components of the SDK", - "UI components", - "Chart components", - "Query and storage components", - "Platform APIs" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "title": "Intro to New Relic One API components", + "title": "Map page views by region in a custom app", "type": "developer", "tags": [ - "SDK components", - "New Relic One apps", - "UI components", - "chart components", - "query and storage components", - "Platform APIs" + "custom app", + "map", + "page views", + "region", + "nerdpack" ], - "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", - "published_at": "2020-10-05T01:55:26Z", - "updated_at": "2020-08-14T01:47:12Z", + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, - "info": "Intro to New Relic One API components", - "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 193.44286, + "_score": 281.5746, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Intro to New Relic One API components", - "sections": "Intro to New Relic One API components", - "info": "Intro to New Relic One API components", - "tags": "New Relic One apps", - "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" + "sections": "Import additional modules from New Relic One", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5efa989e28ccbc4071307de5" + "id": "5efa993c196a67066b766469" }, { "sections": [ - "Nerdpack file structure", - "Generate Nerdpack components", - "Nerdlet file structure", - "index.js", - "nr1.json", - "styles.scss", - "icon.png", - "Launcher file structure" + "Set up your development environment", + "Before you begin", + "A note on support", + "Tip", + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Nerdpack file structure", + "title": "Set up your development environment", "type": "developer", "tags": [ - "New Relic One CLI", - "nerdpack", - "file structure", - "nerdlets", - "launchers" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:49:25Z", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "An overview of the Nerdpack File Structure", - "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 180.80276, + "_score": 278.2782, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Nerdpack file structure", - "sections": "Nerdpack file structure", - "info": "An overview of the Nerdpack File Structure", - "tags": "file structure", - "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" + "tags": "New Relic One CLI", + "body": ". At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view" }, - "id": "5efa989e196a671300766404" + "id": "5efa9973e7b9d242237bab39" }, { "image": "", @@ -4494,28 +4759,68 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:14:19Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", + "document_type": "page", + "popularity": 1, + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 277.20374, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL" + }, + "id": "5f28bd6ae7b9d267996ade94" + } + ], + "/build-apps/add-nerdgraphquery-guide": [ + { + "image": "", + "url": "https://developer.newrelic.com/build-apps/", + "sections": [ + "Build apps", + "Guides to build apps", + "Create a \"Hello, World!\" application", + "Permissions for managing applications", + "Set up your development environment", + "Add, query, and mutate data using NerdStorage", + "Add the NerdGraphQuery component to an application", + "Add a table to your app", + "Add a time picker to your app", + "Create a custom map view", + "Publish and deploy apps" + ], + "published_at": "2020-10-06T02:08:36Z", + "title": "Build apps", + "updated_at": "2020-10-06T02:08:36Z", + "type": "developer", + "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 153.23781, + "_score": 750.39343, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" + "title": "Build apps", + "sections": "Add the NerdGraphQuery component to an application", + "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add" }, - "id": "5f28bd6ae7b9d267996ade94" + "id": "5efa999d64441fc0f75f7e21" }, { "sections": [ @@ -4558,7 +4863,7 @@ "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-05T01:53:44Z", + "published_at": "2020-10-06T02:08:36Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -4566,282 +4871,172 @@ "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 131.00172, + "_score": 353.73676, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Create and serve a new Nerdpack", - "tags": "nerdpack", - "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" + "title": "Map page views by region in a custom app", + "sections": "Query your browser data", + "info": "Build a New Relic app showing page view data on a world map.", + "tags": "custom app", + "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" }, "id": "5efa993c196a67066b766469" }, { "sections": [ - "Permissions for managing applications", - "New Relic One pricing plan", - "Original product-based pricing" - ], - "title": "Permissions for managing applications", - "type": "developer", - "tags": [ - "nerdpack manager", - "permissions", - "managing apps" - ], - "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", - "image": "", - "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-09-02T02:04:41Z", - "document_type": "page", - "popularity": 1, - "info": "Learn about permissions for subscribing to apps", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 103.62146, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Permissions for managing applications", - "sections": "Permissions for managing applications", - "info": "Learn about permissions for subscribing to apps", - "tags": "nerdpack manager", - "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" - }, - "id": "5f45bf2864441ffb4dfdcdbb" - } - ], - "/explore-docs/query-and-store-data": [ - { - "sections": [ - "Intro to NerdStorage", - "Use NerdStorage in your apps", - "Data model", - "Limits", - "Data access", - "Permissions for working with NerdStorage" + "Query and store data", + "Components overview", + "Query components", + "Mutation components", + "Static methods", + "NrqlQuery" ], - "title": "Intro to NerdStorage", + "title": "Query and store data", "type": "developer", "tags": [ - "nerdstorage", - "nerdstorage components", - "new relic one apps", - "data access" + "nerdgraph query components", + "mutation components", + "static methods" ], - "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", + "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", "image": "", - "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-05T01:56:44Z", - "updated_at": "2020-09-08T01:50:19Z", + "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", + "published_at": "2020-10-06T02:14:19Z", + "updated_at": "2020-08-01T01:42:02Z", "document_type": "page", "popularity": 1, - "info": "Intro to NerdStorage on New Relic One", - "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 136.14728, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "tags": "nerdstorage components", - "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order" - }, - "id": "5efa989ee7b9d2048e7bab92" - }, - { - "category_2": "Java agent release notes", - "nodeid": 11976, - "sections": [ - "APM agent release notes", - "Go agent release notes", - "Java agent release notes", - ".NET agent release notes", - "Node.js agent release notes", - "PHP agent release notes", - "Python agent release notes", - "Ruby agent release notes", - "C SDK release notes", - "Java Agent 3.36.0", - "Improvements", - "Fixes" - ], - "title": "Java Agent 3.36.0", - "category_0": "Release notes", - "type": "docs", - "category_1": "APM agent release notes", - "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050", - "image": "", - "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360", - "published_at": "2020-10-03T17:31:36Z", - "updated_at": "2018-04-14T23:39:35Z", - "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes", - "document_type": "release_notes", - "popularity": -2, - "body": "[RSS] Released on:  Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.", - "info": "", + "info": "Reference guide for SDK query components using NerdGraph", + "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 46.731064, + "_score": 263.1992, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug" + "title": "Query and store data", + "sections": "Components overview", + "info": "Reference guide for SDK query components using NerdGraph", + "tags": "nerdgraph query components", + "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query" }, - "id": "58a53cf38e9c0f755a81db4e" + "id": "5efa989e28ccbc2f15307deb" }, { - "category_2": "API guides", - "nodeid": 11521, + "category_2": "Alert conditions", + "nodeid": 9231, "sections": [ - "Java agent", - "Getting started", - "Installation", - "Additional installation", - "Heroku", - "Configuration", - "Attributes", - "Features", - "Instrumentation", - "Custom instrumentation", - "API guides", - "Async instrumentation", + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", "Troubleshooting", - "Guide to using the Java agent API", - "Use the API", - "Transactions", - "Instrument asynchronous work", - "Implement distributed tracing", - "Implement cross application tracing", - "Obtain references to New Relic entities", - "Additional API functionality", - "Additional API usage examples", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", "For more help" ], - "title": "Guide to using the Java agent API ", - "category_0": "APM agents", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", "type": "docs", - "category_1": "Java agent", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api", - "published_at": "2020-10-03T17:13:08Z", - "updated_at": "2020-09-03T11:06:02Z", - "breadcrumb": "Contents / APM agents / Java agent / API guides", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.", - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 32.245056, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional" - }, - "id": "5a3137f4e621f4576cf1e35f" - }, - { - "category_2": "PHP agent API", - "nodeid": 11821, - "sections": [ - "PHP agent", - "Getting started", - "Installation", - "Advanced installation", - "Configuration", - "API guides", - "PHP agent API", - "Attributes", - "Features", - "Frameworks and libraries", - "Troubleshooting", - "newrelic_add_custom_tracer", - "Requirements", - "Description", - "Parameters", - "Return value(s)", - "Example(s)", - "Instrument a function", - "Instrument a method within a class", - "Instrument a method within a namespaced class", - "For more help" - ], - "title": "newrelic_add_custom_tracer (PHP agent API)", - "category_0": "APM agents", - "type": "docs", - "category_1": "PHP agent", - "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e", - "image": "", - "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer", - "published_at": "2020-10-03T17:22:37Z", - "updated_at": "2019-09-30T22:55:59Z", - "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API", - "document_type": "api_doc", - "popularity": 1, - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 26.17691, + "_score": 260.53986, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Instrument a method within a class", - "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ", - "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument" + "sections": "Sum of query results (limited or intermittent data)", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "category_0": "Alerts and Applied Intelligence", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" }, - "id": "58ca4191e621f45edd466e7a" + "id": "5f2d992528ccbc489d88dfc1" }, { - "nodeid": 9691, + "category_2": "NRQL query tutorials", + "nodeid": 36916, "sections": [ - "Introduction to New Relic Mobile (Unity)", - "Contents", - "Monitor mobile app performance", - "Install and configure", - "Use Unity SDK API", - "Send custom events and attributes to Insights", - "Track custom network requests", - "Uninstall plugin", - "Unity release notes", + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", "For more help" ], - "title": "Introduction to New Relic Mobile (Unity)", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", "type": "docs", - "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c", - "image": "", - "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity", - "published_at": "2020-10-04T04:12:22Z", - "updated_at": "2020-07-25T00:44:01Z", - "breadcrumb": "Contents", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "info": "", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 17.220583, + "_score": 254.10881, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5c52cbec8e9c0f0b286080ec" + "id": "5f2b1349196a67379343fbcf" } ], - "/explore-docs/nr1-catalog": [ + "/explore-docs/nr1-config": [ { "sections": [ "New Relic One CLI reference", @@ -4864,7 +5059,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -4872,7 +5067,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 291.41327, + "_score": 229.33054, "_version": null, "_explanation": null, "sort": null, @@ -4881,50 +5076,99 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" + "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" }, "id": "5efa989e28ccbc535a307dd0" }, { - "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", - "url": "https://developer.newrelic.com/", "sections": [ - "Mark your calendar for Nerd Days 1.0", - "Get coding", - "Create custom events", - "Add tags to apps", - "Build a Hello, World! app", - "Get inspired", - "Add a table to your app", - "Collect data - any source", - "Automate common tasks", - "Create a custom map view", - "Add a time picker to your app", - "Add custom attributes", - "New Relic developer champions", - "New Relic Podcasts" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "published_at": "2020-10-05T01:45:14Z", - "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "title": "New Relic CLI Reference", "type": "developer", - "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", - "info": "", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 197.79489, + "_score": 151.85236, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Developers", - "sections": "New Relic developer champions", - "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "5d6fe49a64441f8d6100a50f" + "id": "5efa989ee7b9d2024b7bab97" + }, + { + "category_2": "Troubleshooting", + "nodeid": 13726, + "sections": [ + "Cross-product functions", + "Install and configure", + "Troubleshooting", + "New Relic Diagnostics", + "Compatibility", + "Run New Relic Diagnostics", + "Suites flag (highly recommended CLI option)", + "View suites", + "Run suites", + "View or copy attachment key", + "Upload results to a support ticket", + "Automatic upload", + "Manual upload", + "Pass command line options", + "Validate your config file settings", + "Interpret the output", + "File output", + "Result status codes", + "Run New Relic Diagnostics in a Docker container", + "Licensing and security", + "For more help" + ], + "title": "New Relic Diagnostics", + "category_0": "Using New Relic", + "type": "docs", + "category_1": "Cross-product functions", + "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", + "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", + "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", + "published_at": "2020-10-03T18:09:20Z", + "updated_at": "2020-10-03T18:09:20Z", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "document_type": "page", + "popularity": 1, + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 142.72093, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic Diagnostics", + "sections": "New Relic Diagnostics", + "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", + "category_0": "Using New Relic", + "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", + "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + }, + "id": "5e9af5ba28ccbc3d4fd94a21" }, { "image": "", @@ -4950,7 +5194,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:14:19Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -4961,7 +5205,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 166.62445, + "_score": 118.52101, "_version": null, "_explanation": null, "sort": null, @@ -4975,93 +5219,41 @@ }, { "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" - ], - "title": "Serve, publish, and deploy your New Relic One app", - "type": "developer", - "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" - ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-09-02T02:05:55Z", - "document_type": "page", - "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 137.8067, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Serve, publish, and deploy your New Relic One app", - "info": "Start sharing and using the custom New Relic One apps you build", - "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" - }, - "id": "5efa999de7b9d283e67bab8f" - }, - { - "sections": [ - "Create a \"Hello, World!\" application", + "Set up your development environment", "Before you begin", + "A note on support", "Tip", - "Create a local version of the \"Hello, World!\" application", - "Publish your application to New Relic", - "Add details to describe your project", - "Subscribe accounts to your application", - "Summary", - "Related information" + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Create a \"Hello, World!\" application", + "title": "Set up your development environment", "type": "developer", "tags": [ - "nr1 cli", - "Nerdpack file structure", - "NR One Catalog", - "Subscribe applications" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "aa427030169067481fb69a3560798265b6b52b7c", - "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", - "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-08-21T01:45:19Z", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", + "image": "", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Build a \"Hello, World!\" app and publish it to New Relic One", - "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 135.41148, + "_score": 112.36724, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Publish your application to New Relic", - "info": "Build a "Hello, World!" app and publish it to New Relic One", - "tags": "NR One Catalog", - "body": ", you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already" + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5efa9973196a67d16d76645c" + "id": "5efa9973e7b9d242237bab39" } ], "/explore-docs/intro-to-sdk": [ @@ -5076,23 +5268,23 @@ "Set up your development environment", "Add, query, and mutate data using NerdStorage", "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", "Add a table to your app", + "Add a time picker to your app", "Create a custom map view", "Publish and deploy apps" ], - "published_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:08:36Z", "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "updated_at": "2020-10-06T02:08:36Z", "type": "developer", "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 30 min Add a table to your app Add a table to your New Relic One app 20 min Add a time picker to your app Add a time picker to a sample application 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 872.8204, + "_score": 865.7118, "_version": null, "_explanation": null, "sort": null, @@ -5123,7 +5315,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:13:00Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -5131,7 +5323,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 665.4148, + "_score": 652.256, "_version": null, "_explanation": null, "sort": null, @@ -5164,7 +5356,7 @@ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-05T01:53:45Z", + "published_at": "2020-10-06T02:08:36Z", "updated_at": "2020-09-17T01:48:42Z", "document_type": "page", "popularity": 1, @@ -5172,7 +5364,7 @@ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 566.0984, + "_score": 554.04913, "_version": null, "_explanation": null, "sort": null, @@ -5218,7 +5410,7 @@ "body": "As IT departments seek to optimize their cloud applications, they are decomposing application monoliths into microservices. A microservice architecture is an approach that delivers a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Following a service-oriented architecture (SOA) model, each service should offer public API interfaces to any other service in the environment. Fragmenting applications into their most basic services enables the continuous delivery/deployment of large, complex applications by removing barriers and silos that previously lengthened the application release cycle. It also enables an organization to evolve its technology stack for modern cloud environments and to operate at internet-scale. With microservices, app developers can build, manage, scale, and reuse services independently, resolve issues faster, increase the rate of deployments, and ultimately deliver an enhanced end-user experience. This quest to use microservices to optimize applications is an iterative process. We recommend the following six steps, using the New Relic platform, to ensure an effective migration path to microservices. 1. Deploy instrumentation on all application tiers and components In order to determine which components of an application can be broken into microservices, you need to deploy instrumentation on all tiers and components of the target application. This will allow you to determine baseline application performance, quantify transaction volumes, and gather other key metrics that will determine where you begin your microservice journey. Specifically, you should: Monitor your web apps with APM. See Compatibility and requirements for New Relic agents and products to learn precise compatibility details for each supported language, and then install the APM agent on your application stack. Steps for installing APM agents vary based on language. Monitor your compute resources with Infrastructure. See Compatibility and requirements for Infrastructure for supported operating systems and environments. You can also instrument other products and services with on-host integrations. In some cases, it may be helpful to use custom instrumentation to gather detailed performance metrics that aren’t necessarily required in the course of normal application monitoring. For example, you may want to add custom instrumentation to key controllers that are candidates for decomposition to gather very granular response time and throughput information. 2. Use key metrics to identify components that you can migrate to microservices Once you have instrumented your application, you can begin to identify which components are strong candidates to migrate to microservices. It is important to consult with colleagues who have written, designed, and/or maintained the application, to supplement the context that your baseline data provides. Their experience and recommendations will help to guide the decomposition effort. In addition, you should analyze objective metrics such as transaction call volume and response time. These metrics will point to components in your monolithic application that are heavily called and/or are responding slowly, which means that they are adding disproportionate load to the monolith, possibly degrading application performance and end-user experience. As microservices, it will be easier to regularly improve and optimize these components. As a result, you will be able to break away and eliminate the most pressing bottlenecks from your monolithic application. one.newrelic.com > APM > Transactions: Identify which components are slowing you down. 3. Use deployment markers to establish app performance baselines Breaking down monolithic applications into a microservice architecture is typically an iterative project. You will be continually identifying monolithic components that can be decomposed into microservices, and then optimizing them as business and technology requirements dictate. Deployment tracking lets you quickly see, in a side-by-side comparative view, how architectural and code changes impact your application’s performance. You can then use this information to direct future development efforts and to demonstrate return on investment to the business. You should make deployment markers an integral part of the development process by adding them into your build/deployment process automation. You can view instructions on setting up deployment markers on the Deployments page in APM. one.newrelic.com > APM > Events > Deployments: Understand how deployments affect your performance. 4. Implement the new microservice-based architecture, and measure the success of your application development processes Your developers should now have marching orders for which application components to migrate to microservices. It’s important for these teams to embrace modern software development practices to support your overarching business and technology initiatives. Measuring process improvements is vital to driving alignment and velocity. You should instrument your build/test pipeline using custom events. This will allow you to gather data about: The rate at which new code is moving through the pipeline Quality metrics (for example, what percent of the code is passing tests, if there is automated testing involved) The rate of new deployments via deployment markers These quantitative data points will allow development and operations teams to visualize the adoption of new processes, measure development team productivity, and assess whether these new processes are moving the needle positively or negatively. one.newrelic.com > Dashboards: Visualize the adoption of new processes with dashboards. 5. Create a dashboard to monitor KPIs Once you have determined that the application and its microservices components are (somewhat) production-ready, compare the performance of your new, modern application to the monolithic application (either today or how it performed pre-migration). This will allow you to demonstrate success and to highlight areas for improvement. Key KPIs to monitor and compare include Response Time, Error Rate, Transaction Call Volume, Operational Cost, Availability, and Apdex. one.newrelic.com > Dashboards: Build KPI dashboards to view all your indicators in one place. 6. Create a new baseline to use for comparisons At this point, you have migrated components of your monolithic application to microservices, and you are now empowered with up-to-date data on how your new application is performing compared to your legacy application. Now you have a new launching point for evaluating which other components of your application can be decomposed into microservices, or which microservice components require more performance tuning. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 559.6985, + "_score": 536.9149, "_version": null, "_explanation": null, "sort": null, @@ -5233,268 +5425,291 @@ "id": "5f58347e64441f8c45e0684c" }, { - "category_2": "Getting started", - "nodeid": 7646, + "category_2": "Measure DevOps success", + "nodeid": 16416, "sections": [ - "New Relic APM", - "Getting started", - "Guides", - "Apdex", - "Maintenance", - "Troubleshooting", - "Introduction to APM", - "Why it matters", - "Monitor all aspects of your business", - "Ready to get started?", - "What's next?", + "New Relic solutions", + "Measure DevOps success", + "Cloud adoption", + "Optimize your cloud native environment", + "Establish objectives and baselines: define team SLOs", + "Service level components", + "Resources", + "1. Build an inventory of services requiring SLOs", + "2. Research customer expectations for SLOs", + "3. Define SLOs", + "4. Determine what can be instrumented", + "5. Review the default metrics", + "6. Set up custom instrumentation", + "7. Create Insights dashboards to track SLIs", "For more help" ], - "title": "Introduction to APM", - "category_0": "APM", + "title": "Establish objectives and baselines: define team SLOs", + "category_0": "New Relic solutions", "type": "docs", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "external_id": "8493d5b3cfc6429cf4b18b7d3d6a3c29b4ae713a", - "image": "", - "url": "https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm", - "published_at": "2020-10-03T14:46:24Z", - "updated_at": "2020-10-03T14:46:24Z", - "breadcrumb": "Contents / APM / New Relic APM / Getting started", + "category_1": "New Relic solutions", + "external_id": "c51fb6972a0e1d7cd72eaea21310026ec5ddb6a4", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/catalyst-establish-objectives-2.png", + "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/establish-objectives-baselines-define-team-slos", + "published_at": "2020-10-03T21:44:47Z", + "updated_at": "2020-09-28T00:26:46Z", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success", "document_type": "page", "popularity": 1, - "info": "New Relic APM: an overview of its features and functionality.", - "body": "Application performance monitoring (APM) provides monitoring of your web or non-web application's performance. APM supports apps using several programming languages. Our APM agents give you real-time observability matched with trending data about your application's performance and the user experience. Agents reveal what is happening deep in your code with end to end transaction tracing and a variety of color-coded charts and reports. Why it matters Our APM agents report and store the state of your application so you can quickly identify potential problems before they affect your end users. With APM, your DevOps teams don't need to guess whether a performance blocker comes from the app itself, CPU availability, database loads, or something entirely unexpected. Use our APM solutions to gather both current and historical information about memory usage, CPU utilization, database query performance, web browser rendering performance, app availability, error analysis, external services, and other useful metrics. We have agents for Go, Java, .NET, Node.js, PHP, Python, and Ruby, as well as a C SDK. Monitor all aspects of your business To get a high-level overview of all your applications and services, use our entity explorer. Take advantage of these APM features, and more: Features Description App performance at a glance When you sign in to APM and select an app for your account, use the Summary page to quickly examine relationships across different aspects of your environment; for example: Web transactions response time: Where is the most time being spent? In the request queue, during different stages of page rendering and execution, from external services, or something else? Transaction traces: Which transactions are the slowest, and why? Error rate and throughput: What relationship is there between a spike in errors or slower throughput for a particular time period? Was there a deployment or outage at that time? Hosts: What kind of impact does this have on CPU usage, memory, etc.? Apdex: How are these events affecting customers' satisfaction with the site? Web and non-web transactions Start by comparing the top twenty web transactions or non-web transactions in terms of most time consuming, slowest average response time, highest throughput, or worst Apdex. From there, drill down into deeper trace levels for individual transactions, which in turn break down into smaller segments and components, from HTTPS requests on down to SQL queries. Want to explore even deeper? Set up distributed tracing to see how requests move across a distributed system. Select the transactions that are most important to your business (key transactions). APM and Infrastructure When your APM and Infrastructure accounts are linked, you will have access to APM data charts on these Infrastructure UI pages: Hosts, Network, Storage, and Processes. Distributed tracing Distributed tracing gives you visibility across distributed systems, showing you the path of a request as it travels between services. This feature is especially valuable for large, distributed systems that rely on many small services and microservices. Logs Bring your logs and APM agent data together to see logs associated with various objects in the New Relic UI such as applications, APM errors, APM traces, and Kubernetes containers. Service maps APM's service maps show your app's connections and dependencies, including databases and external services. Health indicators and performance metrics show you the current operational status for every part of your architecture. You can create and customize service maps to visualize and monitor your complex architectures. Query your data You can query and visualize your data: Sample and search APM transaction and error data to gain full understanding of the data being collected. Browse your data visually with the data explorer. Create custom SQL-like queries of your data using the New Relic Query Language (NRQL), or using our PromQL-style queries. Use dashboards to build advanced data visualizations, contextualize data, and understand what's going on in your system, real-time. These are just a few of APM's features. To find out more, see the table of contents for APM. Ready to get started? Start benefiting from APM in 5 simple steps (and just a few minutes!). Sign up for a New Relic account. Install and customize the language agent for your app. Generate some traffic for your app. Wait a few minutes for New Relic to start receiving your data. Log in to your account, and start exploring New Relic! If data does not appear after waiting a few minutes, follow the troubleshooting tips for your APM agent. What's next? Learn some more! For a library of videos and other resources about New Relic, visit newrelic.com/resources. New Relic One is our Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our Telemetry Data Platform collects, explores, and alerts on all your metrics, events, logs, and traces from any source with our unified telemetry database. Check out our site for pricing details. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", + "body": "A DevOps transformation requires a cultural shift so that teams can build new skills and motivations for the type of cross-team work required in a true DevOps practice. The transformation can be difficult when the people involved do not see the benefits of change as a clear objective. Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared. They also provide clear boundaries on service expectations that help teams achieve greater velocity and freedom in experimenting with new approaches. This tutorial defines SLOs for successful service delivery objectives and utilize New Relic instrumentation to surface the current performance metrics relative to those objectives. Measurable SLOs and visibility into your current progress against those SLOs ensure that you will be able to properly assess future optimization efforts. Service level components An SLO is an agreed upon means of measuring the performance of your service. The SLO defines a target value of a specified quantitative measure, which is called a service level indicator (SLI); for example: Average response time Response time percentile Application availability SLOs clarify a target value for SLIs; for example: Average response time should be less than 200 ms 95% of requests should be completed within 250 ms Availability of the service should be 99.99% Logically group SLOs together to provide an overall boolean indicator of whether or not the service is meeting expectations. For example, a helpful SLO for alerting purposes could be: 95% of requests completed within 250 ms AND availability is 99.99% Service level components Example values SLI (Indicator) HTTP status codes SLO (Objective) < 1% HTTP 500s over 30 days SLA (Agreement) For every additional .1% of HTTP 500s, 5% refund of total contract Resources Value stream mapping can be a useful exercise to work through before setting SLOs. Work with your teams to clarify key components of your service and the appropriate metrics. Use these inputs as starting points for this tutorial. In addition: Learn about SLOs, SLIs, and SLAs from the Google Cloud Platform blog. Learn how New Relic has applied SLOs and SLIs into its reliability practices form this SREcon18 Americas presentation (approximately 21 minutes). 1. Build an inventory of services requiring SLOs Start defining SLOs for your application by first taking an inventory of the services that your application provides to both your internal and external customers. Draft a list of services. Make the scope of services you consider as comprehensive as possible. Engage your team members and other stakeholders to validate the list for completeness. Segment your application stack to understand the potential components that might require SLOs. For example, most applications can be segmented as: Application (backend/microservices) Dependency services (such as the message queue) Database Website Underlying servers This example lists components that would benefit from SLOs: Customer type Component name Owner Language stack Operating system External Service 1 John D. Java RHEL 6 Internal Service 2 Jane A. .NET Win2003 R2 Internal ActiveMQ John D. Java AIX External Website Jane A. Classic ASP Win2000 Internal MS SQL Dave Z. n/a Win2003 R2 Building a definitive list of services that require an SLO can be challenging, because an application often consists of many endpoints with complex interdependencies. Begin your SLO journey with pragmatism. Start by defining a broader, simpler set of SLOs that are driven by what your customers care about most and what your team can control. As your teams better align around SLOs, you can then begin to fine-tune and add more complexity. 2. Research customer expectations for SLOs Once you have an inventory of services, begin to gather the information you need to define the SLOs for those services. Interviews with customers that depend on your services are often valuable for understanding service expectations. For example, to define SLOs for internal teams, New Relic, ask questions such as: If possible, can you broadly categorize the types of requests we can expect from you and your service? To what extent do you or your service depend on timely responses to requests? Are there requests for which response time is not critical? How does your service handle unavailable dependencies or data? What is the maximum amount of unavailable data that your service can handle? At what threshold does your service fail if a request takes too long? What are acceptable rates of errors? What would a SLA look like between our product and yours? Existing usage data can also be a helpful research input. 3. Define SLOs Using the research on customer expectations that you gathered, draft a focused set of SLOs. New Relic recommends setting SLOs against one or more of the following SLIs: Application availability percentage Average response time Response percentile Error rate Apdex value Also, consider instrumenting and tracking the following SLIs: Throughput (peak and trough) Database call count and duration DNS and SSL timing DOM processing and page rendering Mean-time-to-detection (MTTD) For a more comprehensive list of potential areas to measure, see Measuring DevOps. Recommendation: To determine if your application is performing to customer expectations: Consider combining multiple SLIs (for example, availability and response time) into one SLO. Aim to define a consistent set of conditions across all of the services in your list. Consult your team and stakeholders to validate that the SLOs you set are reasonable, consistently attainable (even if you are not currently meeting them), and aligned to customer expectations. After you finish this step, you should have a set of well-defined SLOs and SLIs. 4. Determine what can be instrumented Now you are ready to deploy agents or monitors to establish a performance baseline for the SLIs you created. With proper instrumentation in place, you will have visibility into the performance indicators that matter for your team and your customers. In addition, you will also have a clear understanding of how to meet your SLOs. Identify the service components your team will optimize. Verify which application tiers meet New Relic monitoring requirements. To ensure you have robust baselines from which to work, determine the level of instrumentation that is possible (or allowed) within your organization. There may be situations where instrumentation of the current on-premise environment is not viable. For example, firewalls with certain settings may not permit New Relic agents to transmit data. Recommendation: If the application has a web front end in these situations, use New Relic Synthetics. Synthetics offers non-agent monitoring while still providing the ability to establish a baseline. To instrument the example applications and components in this tutorial, use these New Relic products: New Relic products Customer type Component name Tier owner Language stack Server OS New Relic products External Service 1 John D. Java RHEL 6 APM, Infrastructure, Synthetics Internal Service 2 Jane A. .Net Win2003 R2 APM, Infrastructure Internal ActiveMQ John D. Java AIX APM, Plugins External Website Jane A. Classic ASP Win2000 Synthetics Internal MS SQL Dave Z. NA Win2003 R2 Infrastructure, On-host integration APM installation After reviewing the compatibility and requirements for New Relic APM, install the APM agent on your application stack. Steps for installing APM agents vary based on language agent type. Follow the installation procedures for specific APM agents. Infrastructure installation After reviewing the requirements for New Relic Infrastructure, follow the installation procedures to install the Infrastructure agent on instances that host your applications. The New Relic Infrastructure agent requires the following host permissions: Linux: To install and run the agent, you must have root privileges. Windows: To install and run the agent, you must have Administrator privileges. Infrastructure on-host integrations To gain extended visibility into applications that your code depends on, deploy on-host integrations based on their availability. New Relic supports several commonly used application components, including MySQL, Apache, NGINX, and more. For more information, see New Relic's on-host integrations documentation. Synthetics New Relic Synthetics is a suite of automated, scriptable tools to monitor your websites, critical business transactions, and API endpoints. Follow the procedures to create a simple browser check. Be sure to verify that your website URL is accessible from the Synthetics public network locations. Browser New Relic Browser provides deep insights into how your users are interacting with your application or website. Browser complements Synthetics with data based on actual user experiences, which is useful in discerning how DevOps efforts are ultimately improving the experience for the customer. For more information, see the compatibility and requirements, then install the New Relic Browser agent. Mobile The growing role of mobile apps in customer experience often spurs new performance data needs. Installation of New Relic Mobile lets DevOps teams instrument iOS and Android applications to gain a fuller understanding of service delivery quality. Plugins Developers can use the New Relic Plugins product to create plugins that monitor numerical metrics provided by external services, hosts, or equipment. You can install existing plugins from Plugin Central, or plan, develop, test, and create your own plugins. 5. Review the default metrics After you deploy the agents and monitors, use service maps to review the default metrics that New Relic captures. For example, a typical service map show many of the common SLIs that application teams rely on, including response time, Apdex, throughput, and error rate metrics from APM. It also shows page load time, Ajax response, throughput, and error rate from Browser. rpm.newrelic.com > Service maps: To explore detailed granularity for any area, use the service map's nodes. 6. Set up custom instrumentation To close any remaining gaps in visibility for your SLIs, use custom instrumentation. New Relic provides several avenues for adding custom instrumentation, including: Making API calls to agents from inside your source code Packaging XML-based custom instrumentation modules with deployed applications Adding UI-based instrumentation without a code deploy In addition, you can add custom attributes to each transaction event that match application performance factors to critical business information. Then you can track those attributes in Insights dashboards. For more information, see the custom instrumentation documentation for your application: APM Browser Infrastructure Insights Mobile Synthetics 7. Create Insights dashboards to track SLIs Once you implement the appropriate instrumentation, it is easy to visualize your service level indicators with New Relic Insights dashboards. Insights provides a single location to query and view all the data that New Relic products gather. For example, Insights helps visualize the following data gathered from New Relic products: Infrastructure: Use default Infrastructure events and attributes for your systems, processes, events, storage, and network; Infrastructure integrations; and custom attributes. APM: Use Transaction and TransactionError event types. Browser: Use PageView and PageAction event types. Mobile: Use several Mobile event types. Synthetics: Use SyntheticCheck, SyntheticRequest, and SyntheticPrivateMinion event types. Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your dashboards. Create dashboards that include widgets for the SLI baseline data. Use these widgets and dashboards to establish team dashboards that you can share and use to conduct operations reviews. insights.newrelic.com > (select a dashboard): Query your SLI baseline data, create dashboards with widgets to visualize the data, then share with your team and stakeholders.​ The metrics you capture will become your application's baseline. Share your Insights dashboard with your application team and stakeholders to provide visibility into what is happening with your application and to monitor future performance. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 550.9646, + "_score": 524.0277, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic APM", - "info": "New Relic APM: an overview of its features and functionality.", - "category_1": "New Relic APM", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/apm/new-relic-apm/getting-started/introduction-apm", - "body": " Full-Stack Observability platform which allows you to easily access, visualize, and troubleshoot your entire software stack in one unified experience. Use New Relic as the single source of truth for Infrastructure monitoring, Serverless monitoring, APM agents, Browser monitoring, and Logs. Our", - "breadcrumb": "Contents / APM / New Relic APM / Getting started" + "title": "Establish objectives and baselines: define team SLOs", + "sections": "New Relic solutions", + "info": "Service level objectives (SLOs) provide a powerful mechanism to codify the goals of a DevOps team in a way that can be measured and shared.", + "category_0": "New Relic solutions", + "category_1": "New Relic solutions", + "body": ". Each event has an event type, a timestamp, and one or more key attributes. For more information about the data that New Relic receives from your app, see Data collection. To query and view the data from the SLIs you selected for baselining: Use the Insights Data explorer to create widgets for your", + "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success" }, - "id": "5f2dcb8a64441f3a1756a9e5" + "id": "5f5b215064441f4c48e06825" } ], - "/build-apps/permission-manage-apps": [ + "/build-apps/build-hello-world-app": [ { - "category_2": "Original users and roles", - "nodeid": 1101, "sections": [ - "Original accounts and billing", - "Original product-based pricing", - "Original users and roles", - "SAML SSO (original users)", - "Original data retention", - "Original pricing plan usage", - "Users and roles (original user model)", - "View and manage users", - "User types: basic user and full user", - "Account roles", - "Add-on roles", - "Account permissions", - "Alert permissions", - "APM permissions", - "Browser permissions", - "Infrastructure permissions", - "Insights permissions", - "Mobile permissions", - "Synthetics permissions", - "Workloads", - "For more help" + "Intro to New Relic One API components", + "Components of the SDK", + "UI components", + "Chart components", + "Query and storage components", + "Platform APIs" ], - "title": "Users and roles (original user model)", - "category_0": "New Relic accounts", - "type": "docs", - "category_1": "Original accounts and billing", - "external_id": "39c7440fe944f68b4de943d2c9619cbcc85408d2", + "title": "Intro to New Relic One API components", + "type": "developer", + "tags": [ + "SDK components", + "New Relic One apps", + "UI components", + "chart components", + "query and storage components", + "Platform APIs" + ], + "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2", "image": "", - "url": "https://docs.newrelic.com/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model", - "published_at": "2020-10-03T17:04:51Z", - "updated_at": "2020-10-03T17:04:51Z", - "breadcrumb": "Contents / New Relic accounts / Original accounts and billing / Original users and roles", + "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/", + "published_at": "2020-10-06T02:11:40Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": "Original user model This doc contains information about how to manage users on our original user model. Not sure which pricing plan or user model you're on? See Overview of pricing plan and user models. View and manage users To see the users on your New Relic account and their current roles: select the account dropdown, select Account settings, and select Users and roles. Some features in the UI are visible only to account Owners and Admins. User types: basic user and full user On the Users and roles UI page, users are categorized as either full users or basic users. This only affects your account once you've switched to the New Relic One pricing plan, released July 2020. Once you've changed your pricing plan, the number of full users is a factor in your billing. Your users on our original user model remain on that user model (and use these original user docs) and additionally have the new full/basic categorization. To learn more, see Transition to new pricing. You can also bulk update changes to user type. Account roles A New Relic account can have only one Owner. To share an account with other users in your organization, create Admins, Users, or Restricted Users. Account role Description Owner The person who initially creates the New Relic account and receives all billing queries. The Owner has complete access to all of the account information. Admin Can add, edit, and delete users, and can enable or set up features. User Can use (and optionally set up) New Relic features. In general, Admins take responsibility for setting up features, and Users and Restricted Users can use them. Restricted User One or more individuals who can view (but not set up or change) any New Relic features. The Restricted User role is useful, for example, for demos. You can change your New Relic session settings so that Restricted User logins do not time out, and then set the user interface to Kiosk mode. Add-on roles With add-on roles, you can grant variable levels of access to all users in your account, across the entire platform of New Relic products. This allows you to tailor your account permissions levels to suit the needs of Users and Restricted Users within your account. Giving a User or Restricted User add-on manager access to a product grants them the equivalent of Admin capabilities within the product. They will continue to have User or Restricted User capabilities for all other New Relic products. For example, you could make a software engineer in your company a User in most products, but assign Admin-level access to APM. For another example, you might assign the Nerdpack manager role to a user, and that gives them the ability to subscribe and unsubscribe New Relic One applications to an account. There are two types of add-on roles: Add-on Manager roles are available to grant permissions on a per-product basis. Giving a User or Restricted User managed add-on access to a product grants them the equivalent of Admin capabilities within the product. Custom add-on roles can grant feature-specific permissions across different New Relic products. For example, a group of Users could have the ability to acknowledge incidents and close violations in New Relic Alerts, but not have the ability to modify your existing alert preferences. Individuals on a master account that has sub-accounts automatically have the same level of access for all sub-accounts. Below are options for managing both managed add-on roles and custom add-on roles: View roles To view the list of individuals assigned to your account and their current roles: Go to account dropdown > Account settings > Users and roles. Assign a managed role Owner and Admins Managed add-on roles are available by default for each New Relic product. Adding a managed role for a user grants them Admin-level permissions for the assigned product. They cannot be edited or deleted. To assign a managed add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles. From the list of users associated with your account, select their name. Under Add-on roles, select the type of manager role for the user. To understand which capabilities may be added, use the Capabilities preview chart. Features in the Capabilities preview chart may not exactly match what features are available for your subscription level. You can also add, update, or delete users in bulk by using a CSV file. Create a custom role To create a custom add-on role for your account: Go to account dropdown > Account settings > Users and roles > Roles. Select plus-circle New custom add-on role. Select the capabilities necessary for the new custom role, then Create role. Assign a custom role Owners and Admins You must create a custom role before assigning it to a user. To assign a custom add-on role for a User or Restricted User in your account: Go to account dropdown > Account settings > Users and roles > Users. From the list of users associated with your account, select their name ]. Under Add-on roles, select a custom role for the user. Click Update user. Edit or delete a custom role Owners and Admins You cannot edit or delete New Relic's default roles. However, you can edit or delete custom add-on roles for your account: Go to account dropdown > Account settings > Users and roles > Roles. From the Add-on roles list, select the custom add-on role, then select pencil Edit role or trash-o Delete role as appropriate. Account permissions Here is a summary of basic user rights for your New Relic account. Individuals on a master account with sub-accounts automatically have the same level of access for all sub-accounts. However, they will not receive email notifications for alerts or weekly reports for sub-accounts unless they are explicitly granted permission on these sub-accounts. Function Owner Admin User Restricted Maintain billing information. fa-check Change the account Owner. fa-check Add, update, and delete account Admins, Users, and Restricted Users. When the account Owner and Admins add individuals to the account, New Relic automatically sends them an email message. fa-check fa-check Update users' job titles and roles from Account settings in the New Relic UI. fa-check fa-check Create, modify and delete sub-accounts from Account settings in the New Relic UI. fa-check fa-check Update your own account information (name, password change or password reset request, default account, email preferences, etc.) from User preferences in the New Relic UI. fa-check fa-check fa-check fa-check Change someone else's password. You cannot reset passwords for anyone else on the account, even if you are an Owner or Admin. Instead, follow standard procedures to request a password reset from New Relic. View the list of individuals on the account from (account dropdown) > Account settings > Account > Summary in the New Relic UI. fa-check fa-check fa-check fa-check Manage flexible data retention. fa-check Subscribe and unsubscribe applications to New Relic One fa-check fa-check Alert permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Alerts. To allow a User or Restricted User to execute any of these functions in New Relic Alerts, assign an Alerts add-on manager role. Admin and manager capabilities for Alerts include: Create or name alert policies. Specify incident preferences. Disable or define alert conditions. Provide runbook instructions. Select product targets. Alter alert condition thresholds. Create, modify, or delete notification channels. APM permissions Here is a summary of Admin and Add-on manager capabilities with New Relic APM. To allow a User or Restricted User to execute any of these functions in New Relic APM, assign an APM add-on manager role. Admin and manager capabilities for APM include: Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add-on manager role. Admin and manager capabilities for Browser include: Add, rename, or delete applications. Manage whitelists. Manage domain conditions. Infrastructure permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Infrastructure. To allow a User or Restricted User to execute any of these functions in New Relic Infrastructure, assign an Infrastructure manager role. Admin and manager capabilities for Infrastructure include: Create alert conditions in New Relic Infrastructure, including conditions for host not reporting. Add or modify integrations. Insights permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Insights. To allow a User or Restricted User to execute any of these functions in New Relic Insights, assign an Insights manager role. These functions include: Create, view, modify, or delete Query API keys or Insert API keys. New Relic Insights includes permission levels to share your Insights dashboards with others. Mobile permissions To give permission to delete a mobile app from New Relic, you can assign an Admin or Mobile manager role. ​​​ Synthetics permissions Here's a summary of Admin and Add-on manager capabilities with New Relic Synthetics. To allow a User or Restricted User to execute any of these functions in New Relic Synthetics, assign a Synthetics add-on manager role. Admin and manager capabilities for Synthetics include: Create, edit, or delete monitors. Edit monitor scripts. Create, edit, or delete private locations. Create, edit, or delete monitor downtimes. Create, view, edit, or delete secure credentials. For more information, see User roles in Synthetics. Workloads Here's a summary of Admin and Add-on manager capabilities with New Relic One workloads: Create, duplicate, modify, or delete workloads. Link dashboards to workloads and save filters. To allow a User or Restricted User to execute these functions, assign the workloads manager add-on role. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Intro to New Relic One API components", + "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 157.77112, + "_score": 192.24942, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Account permissions", - "info": "For New Relic original user model: explanation of how to manage users, and how user roles work. ", - "body": ": Remove applications from the New Relic UI. Delete app traces and error traces. Browser permissions Here is a summary of Admin and Add-on manager capabilities with New Relic Browser. To allow a User or Restricted User to execute any of these functions in New Relic Browser, assign a Browser add" + "title": "Intro to New Relic One API components", + "sections": "Intro to New Relic One API components", + "info": "Intro to New Relic One API components", + "tags": "New Relic One apps", + "body": ", and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform" }, - "id": "5f3e194028ccbc18c7f56de3" + "id": "5efa989e28ccbc4071307de5" }, { - "category_2": "Get started", - "nodeid": 11261, "sections": [ - "Amazon integrations", - "Get started", - "AWS integrations list", - "Troubleshooting", - "Integrations and managed policies", - "Recommended policy", - "Optional policy", - "Option 1: Use our CloudFormation template", - "Option 2: Manually add permissions", - "For more help" + "Nerdpack file structure", + "Generate Nerdpack components", + "Nerdlet file structure", + "index.js", + "nr1.json", + "styles.scss", + "icon.png", + "Launcher file structure" ], - "title": "Integrations and managed policies", - "category_0": "Integrations", - "type": "docs", - "category_1": "Amazon integrations", - "external_id": "120a60c8e5e51c4f5f00d624c22a6cad8475db27", + "title": "Nerdpack file structure", + "type": "developer", + "tags": [ + "New Relic One CLI", + "nerdpack", + "file structure", + "nerdlets", + "launchers" + ], + "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", - "url": "https://docs.newrelic.com/docs/integrations/amazon-integrations/get-started/integrations-managed-policies", - "published_at": "2020-10-03T15:15:43Z", - "updated_at": "2020-10-03T15:15:43Z", - "breadcrumb": "Contents / Integrations / Amazon integrations / Get started", + "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", + "published_at": "2020-10-06T02:10:04Z", + "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from AWS. AWS automatically updates this policy when new services are added or existing services are modified. New Relic infrastructure integrations have been designed to function with ReadOnlyAccess policies. For instructions, see Connect AWS integrations to infrastructure. Exception: The Trusted Advisor integration is not covered by the ReadOnlyAccess policy. It requires the additional AWSSupportAccess managed policy. This is also the only integration that requires full access permissions (support:*) in order to correctly operate. We notified Amazon about this limitation. Once it's resolved we'll update documentation with more specific permissions required for this integration. Optional policy If you cannot use the ReadOnlyAccess managed policy from AWS, you can create your own customized policy based on the list of permissions. This allows you to specify the optimal permissions required to fetch data from AWS for each integration. While this option is available, it is not recommended because it must be manually updated when you add or modify your integrations. New Relic has no way of identifying problems related to custom permissions. If you choose to create a custom policy, it is your responsibility to maintain it and ensure proper data is being collected. There are two ways to set up your customized policy: You can either use our CloudFormation template, or create own yourself by adding the permissions you need. Option 1: Use our CloudFormation template Our CloudFormation template contains all the permissions for all our AWS integrations. A user different than root can be used in the managed policy. CloudFormation template AWSTemplateFormatVersion: 2010-09-09 Outputs: NewRelicRoleArn: Description: NewRelicRole to monitor AWS Lambda Value: !GetAtt - NewRelicIntegrationsTemplate - Arn Parameters: NewRelicAccountNumber: Type: String Description: The Newrelic account number to send data AllowedPattern: '[0-9]+' Resources: NewRelicIntegrationsTemplate: Type: 'AWS::IAM::Role' Properties: RoleName: !Sub NewRelicTemplateTest AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::754728514883:root' Action: 'sts:AssumeRole' Condition: StringEquals: 'sts:ExternalId': !Ref NewRelicAccountNumber Policies: - PolicyName: NewRelicIntegrations PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticloadbalancing:DescribeTargetGroups' - 'elasticloadbalancing:DescribeTags' - 'elasticloadbalancing:DescribeLoadBalancerAttributes' - 'elasticloadbalancing:DescribeListeners' - 'elasticloadbalancing:DescribeRules' - 'elasticloadbalancing:DescribeTargetGroupAttributes' - 'elasticloadbalancing:DescribeInstanceHealth' - 'elasticloadbalancing:DescribeLoadBalancerPolicies' - 'elasticloadbalancing:DescribeLoadBalancerPolicyTypes' - 'apigateway:GET' - 'apigateway:HEAD' - 'apigateway:OPTIONS' - 'autoscaling:DescribeLaunchConfigurations' - 'autoscaling:DescribeAutoScalingGroups' - 'autoscaling:DescribePolicies' - 'autoscaling:DescribeTags' - 'autoscaling:DescribeAccountLimits' - 'budgets:ViewBilling' - 'budgets:ViewBudget' - 'cloudfront:ListDistributions' - 'cloudfront:ListStreamingDistributions' - 'cloudfront:ListTagsForResource' - 'cloudtrail:LookupEvents' - 'dynamodb:DescribeLimits' - 'dynamodb:ListTables' - 'dynamodb:DescribeTable' - 'dynamodb:ListGlobalTables' - 'dynamodb:DescribeGlobalTable' - 'dynamodb:ListTagsOfResource' - 'ec2:DescribeVolumeStatus' - 'ec2:DescribeVolumes' - 'ec2:DescribeVolumeAttribute' - 'ec2:DescribeInstanceStatus' - 'ec2:DescribeInstances' - 'ec2:DescribeVpnConnections' - 'ecs:ListServices' - 'ecs:DescribeServices' - 'ecs:DescribeClusters' - 'ecs:ListClusters' - 'ecs:ListTagsForResource' - 'elasticfilesystem:DescribeMountTargets' - 'elasticfilesystem:DescribeFileSystems' - 'elasticache:DescribeCacheClusters' - 'elasticache:ListTagsForResource' - 'es:ListDomainNames' - 'es:DescribeElasticsearchDomain' - 'es:DescribeElasticsearchDomains' - 'es:ListTags' - 'elasticbeanstalk:DescribeEnvironments' - 'elasticbeanstalk:DescribeInstancesHealth' - 'elasticbeanstalk:DescribeConfigurationSettings' - 'elasticloadbalancing:DescribeLoadBalancers' - 'elasticmapreduce:ListInstances' - 'elasticmapreduce:ListClusters' - 'elasticmapreduce:DescribeCluster' - 'elasticmapreduce:ListInstanceGroups' - 'health:DescribeAffectedEntities' - 'health:DescribeEventDetails' - 'health:DescribeEvents' - 'iam:ListSAMLProviders' - 'iam:ListOpenIDConnectProviders' - 'iam:ListServerCertificates' - 'iam:GetAccountAuthorizationDetails' - 'iam:ListVirtualMFADevices' - 'iam:GetAccountSummary' - 'iot:ListTopicRules' - 'iot:GetTopicRule' - 'iot:ListThings' - 'firehose:DescribeDeliveryStream' - 'firehose:ListDeliveryStreams' - 'kinesis:ListStreams' - 'kinesis:DescribeStream' - 'kinesis:ListTagsForStream' - 'rds:ListTagsForResource' - 'rds:DescribeDBInstances' - 'rds:DescribeDBClusters' - 'redshift:DescribeClusters' - 'redshift:DescribeClusterParameters' - 'route53:ListHealthChecks' - 'route53:GetHostedZone' - 'route53:ListHostedZones' - 'route53:ListResourceRecordSets' - 'route53:ListTagsForResources' - 's3:GetLifecycleConfiguration' - 's3:GetBucketTagging' - 's3:ListAllMyBuckets' - 's3:GetBucketWebsite' - 's3:GetBucketLogging' - 's3:GetBucketCORS' - 's3:GetBucketVersioning' - 's3:GetBucketAcl' - 's3:GetBucketNotification' - 's3:GetBucketPolicy' - 's3:GetReplicationConfiguration' - 's3:GetMetricsConfiguration' - 's3:GetAccelerateConfiguration' - 's3:GetAnalyticsConfiguration' - 's3:GetBucketLocation' - 's3:GetBucketRequestPayment' - 's3:GetEncryptionConfiguration' - 's3:GetInventoryConfiguration' - 's3:GetIpConfiguration' - 'ses:ListConfigurationSets' - 'ses:GetSendQuota' - 'ses:DescribeConfigurationSet' - 'ses:ListReceiptFilters' - 'ses:ListReceiptRuleSets' - 'ses:DescribeReceiptRule' - 'ses:DescribeReceiptRuleSet' - 'sns:GetTopicAttributes' - 'sns:ListTopics' - 'sqs:ListQueues' - 'sqs:ListQueueTags' - 'sqs:GetQueueAttributes' - 'tag:GetResources' - 'ec2:DescribeInternetGateways' - 'ec2:DescribeVpcs' - 'ec2:DescribeNatGateways' - 'ec2:DescribeVpcEndpoints' - 'ec2:DescribeSubnets' - 'ec2:DescribeNetworkAcls' - 'ec2:DescribeVpcAttribute' - 'ec2:DescribeRouteTables' - 'ec2:DescribeSecurityGroups' - 'ec2:DescribeVpcPeeringConnections' - 'ec2:DescribeNetworkInterfaces' - 'lambda:GetAccountSettings' - 'lambda:ListFunctions' - 'lambda:ListAliases' - 'lambda:ListTags' - 'lambda:ListEventSourceMappings' - 'cloudwatch:GetMetricStatistics' - 'cloudwatch:ListMetrics' - 'cloudwatch:GetMetricData' - 'support:*' Resource: '*' Option 2: Manually add permissions To create your own policy using available permissions: Add the permissions for all integrations. Add permissions that are specific to the integrations you need The following permissions are used by New Relic to retrieve data for specific AWS integrations: Required by all integrations If an integration is not in listed on this page, these permissions are all you need. All integrations Permissions CloudWatch cloudwatch:GetMetricStatistics cloudwatch:ListMetrics cloudwatch:GetMetricData Resource Tagging API tag:GetResources ALB permissions Additional ALB permissions: elasticloadbalancing:DescribeLoadBalancers elasticloadbalancing:DescribeTargetGroups elasticloadbalancing:DescribeTags elasticloadbalancing:DescribeLoadBalancerAttributes elasticloadbalancing:DescribeListeners elasticloadbalancing:DescribeRules elasticloadbalancing:DescribeTargetGroupAttributes elasticloadbalancing:DescribeInstanceHealth elasticloadbalancing:DescribeLoadBalancerPolicies elasticloadbalancing:DescribeLoadBalancerPolicyTypes API Gateway permissions Additional API Gateway permissions: apigateway:GET apigateway:HEAD apigateway:OPTIONS Auto Scaling permissions Additional Auto Scaling permissions: autoscaling:DescribeLaunchConfigurations autoscaling:DescribeAutoScalingGroups autoscaling:DescribePolicies autoscaling:DescribeTags autoscaling:DescribeAccountLimits Billing permissions Additional Billing permissions: budgets:ViewBilling budgets:ViewBudget Cloudfront permissions Additional Cloudfront permissions: cloudfront:ListDistributions cloudfront:ListStreamingDistributions cloudfront:ListTagsForResource CloudTrail permissions Additional CloudTrail permissions: cloudtrail:LookupEvents DynamoDB permissions Additional DynamoDB permissions: dynamodb:DescribeLimits dynamodb:ListTables dynamodb:DescribeTable dynamodb:ListGlobalTables dynamodb:DescribeGlobalTable dynamodb:ListTagsOfResource EBS permissions Additional EBS permissions: ec2:DescribeVolumeStatus ec2:DescribeVolumes ec2:DescribeVolumeAttribute EC2 permissions Additional EC2 permissions: ec2:DescribeInstanceStatus ec2:DescribeInstances ECS/ECR permissions Additional ECS/ECR permissions: ecs:ListServices ecs:DescribeServices ecs:DescribeClusters ecs:ListClusters ecs:ListTagsForResource EFS permissions Additional EFS permissions: elasticfilesystem:DescribeMountTargets elasticfilesystem:DescribeFileSystems ElastiCache permissions Additional ElastiCache permissions: elasticache:DescribeCacheClusters elasticache:ListTagsForResource ElasticSearch permissions Additional ElasticSearch permissions: es:ListDomainNames es:DescribeElasticsearchDomain es:DescribeElasticsearchDomains es:ListTags Elastic Beanstalk permissions Additional Elastic Beanstalk permissions: elasticbeanstalk:DescribeEnvironments elasticbeanstalk:DescribeInstancesHealth elasticbeanstalk:DescribeConfigurationSettings ELB permissions Additional ELB permissions: elasticloadbalancing:DescribeLoadBalancers EMR permissions Additional EMR permissions: elasticmapreduce:ListInstances elasticmapreduce:ListClusters elasticmapreduce:DescribeCluster elasticmapreduce:ListInstanceGroups Health permissions Additional Health permissions: health:DescribeAffectedEntities health:DescribeEventDetails health:DescribeEvents IAM permissions Additional IAM permissions: iam:ListSAMLProviders iam:ListOpenIDConnectProviders iam:ListServerCertificates iam:GetAccountAuthorizationDetails iam:ListVirtualMFADevices iam:GetAccountSummary IoT permissions Additional IoT permissions: iot:ListTopicRules iot:GetTopicRule iot:ListThings Kinesis Firehose permissions Additional Kinesis Firehose permissions: firehose:DescribeDeliveryStream firehose:ListDeliveryStreams Kinesis Streams permissions Additional Kinesis Streams permissions: kinesis:ListStreams kinesis:DescribeStream kinesis:ListTagsForStream Lambda permissions Additional Lambda permissions: lambda:GetAccountSettings lambda:ListFunctions lambda:ListAliases lambda:ListTags lambda:ListEventSourceMappings RDS, RDS Enhanced Monitoring permissions Additional RDS and RDS Enhanced Monitoring permissions: rds:ListTagsForResource rds:DescribeDBInstances rds:DescribeDBClusters Redshift permissions Additional Redshift permissions: redshift:DescribeClusters redshift:DescribeClusterParameters Route 53 permissions Additional Route 53 permissions: route53:ListHealthChecks route53:GetHostedZone route53:ListHostedZones route53:ListResourceRecordSets route53:ListTagsForResources S3 permissions Additional S3 permissions: s3:GetLifecycleConfiguration s3:GetBucketTagging s3:ListAllMyBuckets s3:GetBucketWebsite s3:GetBucketLogging s3:GetBucketCORS s3:GetBucketVersioning s3:GetBucketAcl s3:GetBucketNotification s3:GetBucketPolicy s3:GetReplicationConfiguration s3:GetMetricsConfiguration s3:GetAccelerateConfiguration s3:GetAnalyticsConfiguration s3:GetBucketLocation s3:GetBucketRequestPayment s3:GetEncryptionConfiguration s3:GetInventoryConfiguration s3:GetIpConfiguration Simple Email Service (SES) permissions Additional SES permissions: ses:ListConfigurationSets ses:GetSendQuota ses:DescribeConfigurationSet ses:ListReceiptFilters ses:ListReceiptRuleSets ses:DescribeReceiptRule ses:DescribeReceiptRuleSet SNS permissions Additional SNS permissions: sns:GetTopicAttributes sns:ListTopics SQS permissions Additional SQS permissions: sqs:ListQueues sqs:GetQueueAttributes sqs:ListQueueTags Trusted Advisor permissions Additional Trusted Advisor permissions: support:* See also the note about the Trusted Advisor integration and recommended policies. VPC permissions Additional VPC permissions: ec2:DescribeInternetGateways ec2:DescribeVpcs ec2:DescribeNatGateways ec2:DescribeVpcEndpoints ec2:DescribeSubnets ec2:DescribeNetworkAcls ec2:DescribeVpcAttribute ec2:DescribeRouteTables ec2:DescribeSecurityGroups ec2:DescribeVpcPeeringConnections ec2:DescribeNetworkInterfaces ec2:DescribeVpnConnections For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of the Nerdpack File Structure", + "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 108.26477, + "_score": 179.26, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Integrations and managed policies", - "sections": "Option 2: Manually add permissions", - "info": "How to use AWS managed policies to grant New Relic permission to monitor your AWS services with infrastructure integrations. ", - "body": "In order to use infrastructure integrations, you need to grant New Relic permission to read the relevant data from your account. Amazon Web Services (AWS) uses managed policies to grant these permissions. Recommended policy Recommendation: Grant an account-wide ReadOnlyAccess managed policy from" + "title": "Nerdpack file structure", + "sections": "Nerdpack file structure", + "info": "An overview of the Nerdpack File Structure", + "tags": "file structure", + "body": " components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png" }, - "id": "5d6c1f4828ccbce6928f6fe0" + "id": "5efa989e196a671300766404" }, { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:14:19Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", - "info": "", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.377144, + "_score": 152.19768, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Permissions for managing applications", - "body": "   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": " Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5f28bd6ae7b9d267996ade94" }, { - "image": "https://cc.sj-cdn.net/instructor/1h7ahmdd447dx-new-relic/courses/2g790g7la1iot/promo-image.1573253956.png", - "url": "https://learn.newrelic.com/live-learncast-new-relic-one-programmability", "sections": [ - "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "About this Learncast", - "Prerequisites", - "Virtual Training Session List" + "Map page views by region in a custom app", + "Before you begin", + "New Relic terminology", + "Build a custom app with a table chart", + "Query your browser data", + "Create and serve a new Nerdpack", + "Review your app files and view your app locally", + "Hard code your account ID", + "Import the TableChart component", + "Add a table with a single row", + "Customize the look of your table (optional)", + "Get your data into that table", + "Make your app interactive with a text field", + "Import the TextField component", + "Add a row for your text field", + "Build the text field object", + "Get your data on a map", + "Install Leaflet", + "Add a webpack config file for Leaflet", + "Import modules from Leaflet", + "Import additional modules from New Relic One", + "Get data for the map", + "Customize the map marker colors", + "Set your map's default center point", + "Add a row for your map", + "Replace \"Hello\" with the Leaflet code" ], - "published_at": "2020-10-05T01:45:50Z", - "title": "Live Learncast: New Relic One Programmability", - "updated_at": "2020-07-31T01:40:49Z", - "type": "", - "external_id": "053510b559767dbde34e3f1ee9a73bbf813a5a83", + "title": "Map page views by region in a custom app", + "type": "developer", + "tags": [ + "custom app", + "map", + "page views", + "region", + "nerdpack" + ], + "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", + "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", + "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-09-17T01:48:42Z", + "document_type": "page", "popularity": 1, - "body": "Sign In Live Learncast: New Relic One Programmability Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications. Not currently available Available until July 10, 2020, 3:30 p.m. PDT. Already registered? Sign In About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) About this Learncast The training is based on the self-paced material freely available on New Relic GitHub and delivered by a New Relic University facilitator who will guide you through the introduction of the first 3 of the 10 labs available. This session allows for active questions and answers and facilitated troubleshooting when code or environments act unpredictably.   During this session we will review the following topics:   1. Installation of New Relic CLI and Environment setup 2. Familiarization with New Relic One Application component model and lifecycle 3. Advanced UI construction and data processing 4. Individual self paced experimentation and Open Source example deployment Prerequisites   This New Relic One training assumes no specific software engineering or developer experience; each lab comes with a fully completed functional solution that participants can copy into the lab repo to complete the activity. The labs are designed to promote experimentation by changing variables, layouts, data access methods, and UI components allowing each participant to comfortably experiment with the material to gain familiarity. Whether you are new to or rusty at programming or JavaScript, or happen to be an expert React.js developer; this training will provide important context to start you on the journey of developing New Relic Applications.   Must have:   Permissions to install  Git installed Node installed A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials Accessing GitHub repositories and cloning existing NR1 applications Executing New Relic CLI commands Making GraphQL and Web Service requests Virtual Training Session List Virtual Training Session List Live Training Sessions Recorded Learncast Part 1 - Introduction (55 min) Part 2 - Advanced (38 min) © 2020 powered by", - "info": "", + "info": "Build a New Relic app showing page view data on a world map.", + "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.50451, + "_score": 129.2698, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Join us for this exclusive 90-minute introduction to the fundamentals of New Relic One Programmability. This training will introduce you to the key concepts and walk you through developing New Relic Applications.", - "body": " A text editor or IDE of your choice (we will be using VS Code) Nerdpack manager roll to deploy   Technical exercises include exposure to the following technical topics: Installing the New Relic command-line interface (CLI) on local workstation Setting New Relic API developer access credentials" + "sections": "Create and serve a new Nerdpack", + "tags": "nerdpack", + "body": " look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One" }, - "id": "5dc618cbe7b9d2a0a8e4649c" + "id": "5efa993c196a67066b766469" }, { "sections": [ - "Serve, publish, and deploy your New Relic One app", - "Before you begin", - "Serve your app locally", - "Add images and metadata to your apps", - "screenshots folder", - "documentation.md", - "additionalInfo.md", - "config.json", - "Publish your app", - "Tip", - "Deploy your app", - "Subscribe or unsubsribe apps", - "Handle duplicate applications" + "Permissions for managing applications", + "New Relic One pricing plan", + "Original product-based pricing" ], - "title": "Serve, publish, and deploy your New Relic One app", + "title": "Permissions for managing applications", "type": "developer", "tags": [ - "publish apps", - "deploy apps", - "subscribe apps", - "add metadata apps" + "nerdpack manager", + "permissions", + "managing apps" ], - "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", - "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", - "url": "https://developer.newrelic.com/build-apps/publish-deploy/", - "published_at": "2020-10-05T01:58:07Z", - "updated_at": "2020-09-02T02:05:55Z", + "external_id": "c7f4c7fbd9d093d303c7f8268f8560ff9f435230", + "image": "", + "url": "https://developer.newrelic.com/build-apps/permission-manage-apps/", + "published_at": "2020-10-06T02:08:35Z", + "updated_at": "2020-09-02T02:04:41Z", "document_type": "page", "popularity": 1, - "info": "Start sharing and using the custom New Relic One apps you build", - "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "info": "Learn about permissions for subscribing to apps", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read on to learn about permissions and versions. Permissions for managing applications The Nerdpack manager role is a New Relic add-on role. When you create a Nerdpack, you have the Nerdpack manager role for handling that Nerdpack. New Relic account administrators have the Nerdpack manager role automatically, and can subscribe their accounts to available Nerdpacks. User permissions vary depending on which pricing plan you are on. New Relic One pricing plan For accounts with New Relic One pricing, there are permissions differences for basic users and full users: Full users have the Nerdpack manager role and have full capabilities for creating and managing New Relic One applications, as well as accessing all types of applications in the New Relic One catalog. A basic user can develop and view their own local New Relic One apps, but they cannot: Subscribe other users to apps they’ve created. Access or manage apps in the New Relic One catalog. Access apps in the entity explorer sidebar. Original product-based pricing For accounts on our original product-based pricing, here are access details: Subscribe to publicly available applications To subscribe to publicly available applications, you must have the Nerdpack manager role. Nerdpack manager permissions are automatically assigned to New Relic account owners and admins and can be assigned to individual users. If you aren’t an owner or admin, you can request Nerdpack manager permission, or ask your New Relic admin or owner to subscribe the apps to your account for you. You can add any of the publicly available applications to master accounts or separate sub-accounts on which you have the Nerdpack manager role, or to separate sub-accounts under a master account you own or administer. If you add the application to a master account, the access flows to all of its sub-accounts as well. Subscribe to applications that you create You also must have the Nerdpack manager role to subscribe the applications you create to accounts. Applications that you publish and deploy can only be subscribed to the master account that was used to publish them, or to its sub-accounts. This means you might want a New Relic admin to deploy your applications for you if they need to be available across the organization.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 77.318146, + "_score": 102.445526, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Serve, publish, and deploy your New Relic One app", - "sections": "Add images and metadata to your apps", - "info": "Start sharing and using the custom New Relic One apps you build", - "tags": "publish apps", - "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test" + "title": "Permissions for managing applications", + "sections": "Permissions for managing applications", + "info": "Learn about permissions for subscribing to apps", + "tags": "nerdpack manager", + "body": "Permissions for managing applications When you create an app, you'll likely want to share it. From New Relic One's Apps page, you can subscribe to apps you create, publish, and deploy, and to other publicly available apps. You must have the Nerdpack manager role to subcribe accounts to apps. Read" }, - "id": "5efa999de7b9d283e67bab8f" + "id": "5f45bf2864441ffb4dfdcdbb" } ], - "/explore-docs/nr1-config": [ + "/explore-docs/nr1-catalog": [ { "sections": [ "New Relic One CLI reference", @@ -5517,7 +5732,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -5525,7 +5740,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 232.95508, + "_score": 283.81976, "_version": null, "_explanation": null, "sort": null, @@ -5534,99 +5749,50 @@ "sections": "New Relic One CLI Commands", "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.", "tags": "New Relic One app", - "body": " extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions" + "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build" }, "id": "5efa989e28ccbc535a307dd0" }, { + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "New Relic CLI Reference", + "published_at": "2020-10-06T01:57:17Z", + "title": "New Relic Developers", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 152.48575, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, - { - "category_2": "Troubleshooting", - "nodeid": 13726, - "sections": [ - "Cross-product functions", - "Install and configure", - "Troubleshooting", - "New Relic Diagnostics", - "Compatibility", - "Run New Relic Diagnostics", - "Suites flag (highly recommended CLI option)", - "View suites", - "Run suites", - "View or copy attachment key", - "Upload results to a support ticket", - "Automatic upload", - "Manual upload", - "Pass command line options", - "Validate your config file settings", - "Interpret the output", - "File output", - "Result status codes", - "Run New Relic Diagnostics in a Docker container", - "Licensing and security", - "For more help" - ], - "title": "New Relic Diagnostics", - "category_0": "Using New Relic", - "type": "docs", - "category_1": "Cross-product functions", - "external_id": "e3727dcd782d57b0ccb3dbc1711cdeecda46c218", - "image": "https://docs.newrelic.com/sites/default/files/styles/inline_660px/public/thumbnails/image/screen-nrdiag-output_0.png?itok=chbRj-vb", - "url": "https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics", - "published_at": "2020-10-03T18:09:20Z", - "updated_at": "2020-10-03T18:09:20Z", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "body": "Download latest version New Relic Diagnostics is a utility that automatically detects common problems with New Relic agents. If Diagnostics detects a problem, it suggests troubleshooting steps. New Relic Diagnostics can also automatically attach troubleshooting data to a New Relic Support ticket. For additional troubleshooting steps for your agent, see Not seeing data. New Relic Diagnostics running on Ubuntu Linux. nrdiag checks the configuration of your agents for issues and can generate zipped troubleshooting logs, ready to be attached to support tickets. Compatibility New Relic Diagnostics is available for Linux, macOS, and Windows. It can detect common configuration issues for: APM: Available for all APM agents except C SDK. For the Go agent, only basic connectivity checks are available. Browser monitoring: Browser agent detection Infrastructure monitoring: Linux and Windows agents Diagnostics does not require superuser permissions to run, although New Relic does recommend those permissions for some checks. It will return an error if it does not have permissions to read the files it scans. Run New Relic Diagnostics To use New Relic Diagnostics: Review the release notes, to make sure you have the latest version. Download the latest version, which contains executable files for Linux, macOS, and Windows. Move the executable for your platform into the location of your application's root directory. Recommendation: Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. Note that changing the logging level requires you to restart your application. Run the executable. Recommendation: Run with a task suite (CLI option) to scope your troubleshooting. New Relic Diagnostics automatically searches its root directory and subdirectories for agent configuration files and other relevant data. To run Diagnostics, follow the procedures for your platform: Linux Ensure you have New Relic Diagnostics: From the command line, change the directory to your application's root directory and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/linux directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options and/or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs issues it discovers to your terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/mac directory, move nrdiag into the application's root directory. Run nrdiag (along with any CLI options, or a ticket attachment key): ./nrdiag CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Windows Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip file is present. OR Manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/win directory, move nrdiag.exe or nrdiag_x64.exe into the application's root directory. For troubleshooting web applications, ensure you are running the executable from your project's parent directory, or specify your config file location with the -c option. Run the executable (along with any CLI options or a ticket attachment key) from the directory you placed the binary. Since some checks require elevated permissions, for best results run from an Admin shell. Run via PowerShell if you add any CLI_OPTIONS: ./nrdiag.exe CLI_OPTIONS OR, for x64 systems: ./nrdiag_x64.exe CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and it uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Browser monitoring Ensure you have the latest version of New Relic Diagnostics. If necessary, manually download the latest version. Unzip nrdiag.zip if necessary. From the nrdiag_1.2.3/OS directory, run nrdiag (along with any CLI options or a ticket attachment key): ./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS New Relic Diagnostics outputs any issues it discovers, and uploads relevant files to your New Relic Support ticket if you include a ticket attachment key. Suites flag (highly recommended CLI option) A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives. View suites To review a list of available suites, run New Relic Diagnostics with the -help suites option. ./nrdiag --help suites Run suites Suites are run by providing the -suites flag and one or more suite names (for example, java) to run as arguments. System Command line flag Linux, macOS For 32-bit systems: ./nrdiag --suites SUITE NAMES For 64-bit systems: ./nrdiag_x64 --suites SUITE NAMES Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe --suites SUITE NAMES For 64-bit systems: nrdiag_x64.exe --suites SUITE NAMES View or copy attachment key New Relic Support generates an attachment key for your support ticket, which is used with Diagnostics. To view or copy your attachment key: Log in to your New Relic account at rpm.newrelic.com, then select Help > Get support. Select View open tickets, then select the ticket. Copy the NR Diagnostics attachment key that appears at the top of the ticket. If you do not see the attachment key code, notify Support. Use this attachment key to upload your Diagnostics results to your support ticket. Upload results to a support ticket If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support. Automatic upload To upload your results automatically to a New Relic Support ticket when Diagnostics is executed, use the -attachment-key command line flag with your ticket's attachment key. Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you would like to inspect or modify the contents of this file before upload, follow the manual upload process. System Command line flag Linux, macOS, Synthetics private minion ./nrdiag -attachment-key ATTACHMENT_KEY Windows To run from PowerShell, add ./ to the start of cmd. For 32-bit systems: nrdiag.exe -attachment-key ATTACHMENT_KEY For 64-bit systems: nrdiag_x64.exe -attachment-key ATTACHMENT_KEY Manual upload If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file: ./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME Pass command line options These command line options are available for New Relic Diagnostics: Option Usage -a STRING -attachment-key STRING Attachment key for automatic upload to a support ticket. -browser-url STRING New Relic Diagnostics version 1.1.9 or higher When invoked, this will only run Browser-related Diagnostics checks.This command checks for the presence of the New Relic Browser agent and returns the agent version, the injection method (via APM or via copy/paste), and the Browser loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites. -c STRING -config-file STRING Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file. -file-upload STRING New Relic Diagnostics version 1.1.8 or higher Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default. --filter STRING Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None. -h --help Displays full list of options. -help tasks will provide a full list of available tasks. -output-path STRING Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./ -o --override Pass in arguments to override. This should only generally be done when requested by New Relic Support. Example syntax: --override Java/Config/Agent.Status=Success -p STRING --proxy STRING Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-pw STRING Proxy password, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -proxy-user STRING Proxy username, if necessary. If New Relic Diagnostics finds a proxy in the agent config file, it will use that proxy by default. -s STRING --suites STRING Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run: ./nrdiag -h suites -t STRING --tasks STRING Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run: ./nrdiag -h tasks -usage-opt-out Decline to send anonymous New Relic Diagnostic tool usage data to New Relic for this run. -v --verbose Display verbose logging during check execution. Disabled by default. --version Display current New Relic Diagnostics version. Will also prompt to check for a newer version and prompt to download if a newer version is available. -y --yes Say yes to any prompt that comes up while running. Disabled by default. Validate your config file settings New Relic Diagnostics now features more detailed configuration setting validation. Currently the Java agent's newrelic.yml file is supported, and support for other agents' configuration files is planned. If you run nrdiag in the usual manner - on the system running your application, with the New Relic agent already installed - the new validation will be applied automatically, and any warnings will be shown. You can also use this feature as a \"linter\" - to validate a config file before deployment - by running the appropriate task and providing the path to your config file. For example, if your newrelic.yml and nrdiag are both in the current directory, you can run the following command to lint the config file: ./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml. The screenshot below shows an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of \"yes\", but the Java agent only accepts the values \"true\" or \"false\" - this misconfiguration will prevent the agent from running. When you've enabled your agent incorrectly, you'll see a message like this describing what setting needs to be updated and how it needs to be changed. Interpret the output After executing New Relic Diagnostics from your terminal, you will see the results for each task as they are completed. Tasks that result in a Warning or Failure status code will log additional details regarding possible issues found during execution, along with troubleshooting suggestions and relevant links to documentation: New Relic Diagnostics outputs any issues it found with your installation, along with troubleshooting suggestions. File output New Relic Diagnostics outputs three files: Diagnostics output files Comments nrdiag-output.zip A flattened folder structure with one or more config files and any existing New Relic logs. Attach this file to support tickets. This archive also contains a copy of nrdiag-output.json nrdiag-output.json Output of the individual tests. Attach this output to tickets. nrdiag-filelist.txt A list of files found. The nrdiag-output.zip file that you attach to support tickets automatically includes this list. You do not need to attach this .txt file separately. Result status codes New Relic Diagnostics returns the following status codes after running: Status code Definition Success Task successfully executed with no issues detected. Warning Task successfully executed. However, possible issues detected. Failure Task failed with issues detected. Error Task unable to execute. This could be due to a permissions issues. None Task was determined irrelevant to detected environment and was not executed. Run New Relic Diagnostics in a Docker container To troubleshoot your New Relic-instrumented application running in a Docker container you can use the docker exec command as follows: Download and unzip the nrdiag_latest.zip file. Copy the binary to the container. Replace IMAGE_NAME with the name of your docker container: docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin Run the nrdiag command in the docker container. Replace IMAGE_NAME as above, and replace APPLICATION_ROOT with the root directory of your application, where you installed the New Relic agent: docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag (Optional) Remove the nrdiag binary when finished: docker exec IMAGE_NAME rm /bin/nrdiag Licensing and security The use of New Relic Diagnostics is subject to this license agreement, as well as licensing agreements for open-source software used by New Relic Diagnostics. Like any other New Relic tool, the Diagnostic service is designed to protect you and your customers' data privacy. New Relic Diagnostics inspects system information and New Relic product artifacts (logs, config files) that are relevant for performing diagnostic checks that assess New Relic product configuration and operability. By default, this data is not transmitted to New Relic. You do have the option to upload this information to a support ticket over HTTPS. Data uploaded to support tickets Diagnostics does allow uploading of this information to a support ticket over HTTPS, with the use of a specific command-line argument. You will be prompted before collection of any files that we expect to have a likelihood of containing sensitive information. Before the collected files contained within nrdiag-output.zip are uploaded to New Relic, you will also be prompted. This allows you to review and edit any information that you do not want to provide. (For example, the nrdiag-output.zip will include your user name.) You also have the option to cancel the upload altogether. Data storage Any support ticket attachments made using Diagnostics or containing Diagnostics data that are less than or equal to 20MB are stored by Zendesk. Otherwise these attachments are stored by New Relic. For more information, see Zendesk's privacy and data protection policies. Environment variables New Relic Diagnostics examines the following environment variables to perform diagnostic checks. The values of these variables are recorded locally in the nrdiag-output.json file. Any environment variable containing NEWRELIC or NEW_RELIC Any environment variable beginning with NRIA PATH HOME RUBY_ENV RAILS_ENV APP_ENV RACK_ENV LOCALAPPDATA DOTNET_SDK_VERSION DOTNET_INSTALL_PATH COR_PROFILER COR_PROFILER_PATH COR_ENABLE_PROFILER CORECLR_ENABLE_PROFILING CORECLR_PROFILER CORECLR_PROFILER_PATH ProgramFiles ProgramData APPDATA JBOSS_HOME JAVA_VERSION_MAJOR JAVA_VERSION_MINOR JAVA_VERSION_BUILD JAVA_PACKAGE JAVA_JCE JAVA_HOME GLIBC_REPO GLIBC_VERSION LANG WORKDIR MINION_JAR DEFAULT_LOCALE_CFG_FILE MINION_PROVIDER MINION_USER MINION_GROUP MINION_LOG_LEVEL DOCKER_API_VERSION DOCKER_HOST MINION_API_ENDPOINT MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT MINION_API_PROXY MINION_API_PROXY_SELF_SIGNED_CERT MINION_CHECK_TIMEOUT MINION_DOCKER_API_VERSION MINION_DOCKER_HOST MINION_DOCKER_RUNNER_APPARMOR MINION_JVM_MB MINION_JVM_OPTS For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.88081, + "_score": 196.74231, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic Diagnostics", - "sections": "New Relic Diagnostics", - "info": "Use New Relic Diagnostics to automatically diagnose common problems with New Relic agents, and send the results to Support.", - "category_0": "Using New Relic", - "body": " terminal. If it doesn't, then include an attachment key as a CLI option. This will add relevant files to your support ticket for troubleshooting. macOS Ensure you have New Relic Diagnostics: From the command line, change directory to the application's root directory, and ensure that the nrdiag.zip", - "breadcrumb": "Contents / Using New Relic / Cross-product functions / Troubleshooting" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any" }, - "id": "5e9af5ba28ccbc3d4fd94a21" + "id": "5d6fe49a64441f8d6100a50f" }, { "image": "", @@ -5652,7 +5818,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:14:19Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -5663,7 +5829,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.493225, + "_score": 164.66307, "_version": null, "_explanation": null, "sort": null, @@ -5677,384 +5843,476 @@ }, { "sections": [ - "Set up your development environment", + "Serve, publish, and deploy your New Relic One app", "Before you begin", - "A note on support", + "Serve your app locally", + "Add images and metadata to your apps", + "screenshots folder", + "documentation.md", + "additionalInfo.md", + "config.json", + "Publish your app", "Tip", - "Prepare to build or modify apps", - "Start building", - "Contribute to developer.newrelic.com" + "Deploy your app", + "Subscribe or unsubsribe apps", + "Handle duplicate applications" ], - "title": "Set up your development environment", + "title": "Serve, publish, and deploy your New Relic One app", "type": "developer", "tags": [ - "developer account", - "API key", - "New Relic One CLI" + "publish apps", + "deploy apps", + "subscribe apps", + "add metadata apps" + ], + "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c", + "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png", + "url": "https://developer.newrelic.com/build-apps/publish-deploy/", + "published_at": "2020-10-06T02:17:18Z", + "updated_at": "2020-09-02T02:05:55Z", + "document_type": "page", + "popularity": 1, + "info": "Start sharing and using the custom New Relic One apps you build", + "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 135.71292, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "Serve, publish, and deploy your New Relic One app", + "sections": "Serve, publish, and deploy your New Relic One app", + "info": "Start sharing and using the custom New Relic One apps you build", + "body": " a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add" + }, + "id": "5efa999de7b9d283e67bab8f" + }, + { + "sections": [ + "Create a \"Hello, World!\" application", + "Before you begin", + "Tip", + "Create a local version of the \"Hello, World!\" application", + "Publish your application to New Relic", + "Add details to describe your project", + "Subscribe accounts to your application", + "Summary", + "Related information" + ], + "title": "Create a \"Hello, World!\" application", + "type": "developer", + "tags": [ + "nr1 cli", + "Nerdpack file structure", + "NR One Catalog", + "Subscribe applications" + ], + "external_id": "aa427030169067481fb69a3560798265b6b52b7c", + "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png", + "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/", + "published_at": "2020-10-06T02:07:12Z", + "updated_at": "2020-08-21T01:45:19Z", + "document_type": "page", + "popularity": 1, + "info": "Build a \"Hello, World!\" app and publish it to New Relic One", + "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return

\"Hello, World!\"

; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 133.56865, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "sections": "Publish your application to New Relic", + "info": "Build a "Hello, World!" app and publish it to New Relic One", + "tags": "NR One Catalog", + "body": ", you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already" + }, + "id": "5efa9973196a67d16d76645c" + } + ], + "/collect-data/query-data-nrql": [ + { + "category_2": "Alert conditions", + "nodeid": 9231, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "Create NRQL alert conditions", + "Create NRQL alert condition", + "Alert threshold types", + "NRQL alert syntax", + "Sum of query results (limited or intermittent data)", + "Set the loss of signal threshold", + "Offset the query time window", + "NRQL alert threshold examples", + "Nested Aggregation NRQL Alerts", + "Create a description", + "For more help" ], - "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", - "image": "", - "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-05T01:55:27Z", - "updated_at": "2020-08-26T01:47:20Z", + "title": "Create NRQL alert conditions", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "published_at": "2020-10-04T08:33:54Z", + "updated_at": "2020-10-04T08:33:54Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", "document_type": "page", "popularity": 1, - "info": "Prepare to build apps and contribute to this site", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 112.78566, + "_score": 143.26324, "_version": null, "_explanation": null, "sort": null, "highlight": { - "tags": "New Relic One CLI", - "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" + "title": "Create NRQL alert conditions", + "sections": "NRQL alert syntax", + "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", + "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" }, - "id": "5efa9973e7b9d242237bab39" - } - ], - "/automate-workflows/kubernetes-helm-deployment": [ + "id": "5f2d992528ccbc489d88dfc1" + }, { - "image": "", - "url": "https://developer.newrelic.com/automate-workflows/", + "category_2": "Get started", + "nodeid": 11431, "sections": [ - "Automate workflows", - "Guides to automate workflows", - "Quickly tag resources", - "Set up New Relic using Helm charts", - "Set up New Relic using the Kubernetes operator", - "Automatically tag a simple \"Hello World\" Demo across the entire stack", - "Automate common tasks", - "Set up New Relic using Terraform" + "NRQL: New Relic Query Language", + "Get started", + "NRQL query tools", + "NRQL query tutorials", + "Introduction to NRQL, New Relic's query language", + "What is NRQL?", + "Where can you use NRQL?", + "What data can you query with NRQL?", + "Start using NRQL", + "NRQL query examples", + "NRQL syntax", + "For more help" ], - "published_at": "2020-10-05T01:53:44Z", - "title": "Automate workflows", - "updated_at": "2020-10-04T02:09:04Z", - "type": "developer", - "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", + "title": "Introduction to NRQL, New Relic's query language", + "category_0": "Query your data", + "type": "docs", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "published_at": "2020-10-03T15:18:02Z", + "updated_at": "2020-09-24T08:40:20Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", "document_type": "page", "popularity": 1, - "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", - "info": "", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 5855.1006, + "_score": 112.41968, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Set up New Relic using Helm charts", - "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic" + "title": "Introduction to NRQL, New Relic's query language", + "sections": "What data can you query with NRQL?", + "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", + "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" }, - "id": "5efa999c196a67dfb4766445" + "id": "5f2abd47196a67747343fbe1" }, { - "category_2": "Enable log monitoring", - "nodeid": 34166, + "category_2": "Custom events", + "nodeid": 13661, "sections": [ - "Enable log management", - "New Relic Logs", - "Enable log monitoring", - "Configure logs in context", - "Logs in context for Go", - "Logs in context for Java", - "Logs in context for .NET", - "Logs in context for Node.js", - "Logs in context for PHP", - "Logs in context for Python", - "Logs in context for Ruby", - "Logs in context with agent APIs", - "Kubernetes plugin for log forwarding", - "Requirements", - "Enable Kubernetes for logs management", - "View log data", - "What's next?", + "Event data sources", + "Default events", + "Custom events", + "Data requirements and limits for custom event data", + "General requirements", + "Reserved words", + "Additional Browser PageAction requirements", + "Additional Event API requirements", + "Event type limits", "For more help" ], - "title": "Kubernetes plugin for log forwarding", - "category_0": "Log management", + "title": "Data requirements and limits for custom event data", + "category_0": "Insights", "type": "docs", - "category_1": "Enable log management", - "external_id": "f41bf00f11ec3abe2ccb843a05cbf6d00c004983", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", "image": "", - "url": "https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/kubernetes-plugin-log-forwarding", - "published_at": "2020-10-04T02:40:10Z", - "updated_at": "2020-09-27T16:17:57Z", - "breadcrumb": "Contents / Log management / Enable log management / Enable log monitoring", + "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "published_at": "2020-10-03T18:06:58Z", + "updated_at": "2020-09-27T17:50:31Z", + "breadcrumb": "Contents / Insights / Event data sources / Custom events", "document_type": "page", "popularity": 1, - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic using the Kubernetes plugin, ensure your configuration meets the following requirements: A New Relic license key Kubernetes cluster deployed Enable Kubernetes for logs management To enable logs management with the Fluent Bit Kubernetes plugin: Install the Kubernetes plugin. When installing the plugin as a Helm chart, you can set numerous configurations. However, we recommend the standard setup, as it is valid for most users. Generate some traffic and wait a few minutes, then check your account for data. View log data If everything is configured correctly and your data is being collected, you should see data logs in both of these places: New Relic Logs UI New Relic tools for running NRQL queries. For example, you can execute a query like this: SELECT * FROM Log What's next? Now that you've enabled Logs, here are some potential next steps: Explore your data using the Logs UI. Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more. Query your data and create custom dashboards or alerts. If no data appears after you enable New Relic Logs, follow the troubleshooting procedures. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", + "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.46748, + "_score": 109.84808, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "New Relic Logs", - "info": "A description of New Relic's Kubernetes logging plugin, and how to install it and configure it. ", - "body": "Use the Fluent Bit output plugin to easily forward your logs to New Relic. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin. Requirements To forward your logs to New Relic" + "title": "Data requirements and limits for custom event data", + "sections": "Event data sources", + "category_1": "Event data sources", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", + "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", + "breadcrumb": "Contents / Insights / Event data sources / Custom events" }, - "id": "5f37c1d064441f0d21a0a5e1" + "id": "59f4354f4bb81c2ea8b80d0a" }, { - "category_2": "Private locations", - "nodeid": 23821, + "category_2": "Ingest APIs", + "nodeid": 35526, "sections": [ - "Synthetic monitoring", - "Getting started", - "Guides", - "Using monitors", - "Monitor scripting", - "Administration", - "Private locations", - "UI pages", - "Synthetics API", - "Troubleshooting", - "Install containerized private minions (CPMs)", - "General private minion features", - "Kubernetes-specific features", - "System requirements and compatibility", - "Private location key", - "Sandboxing and Docker dependencies", - "Install and update CPM versions", - "Start the CPM", - "Stop or delete the CPM", - "Show help and examples", - "Show license information", - "Configure CPM", - "Networks", - "Security, sandboxing, and running as non-root", - "Docker image repository", - "Additional considerations for CPM connection", + "Ingest and manage data", + "Get started", + "Understand data", + "Manage data", + "Ingest APIs", + "Metric API limits and restricted attributes", + "Endpoint requirements and maximum limits", + "Rate limit violations", + "Restricted attributes", "For more help" ], - "title": "Install containerized private minions (CPMs)", - "category_0": "Synthetic monitoring", + "title": "Metric API limits and restricted attributes", + "category_0": "Telemetry Data Platform", "type": "docs", - "category_1": "Synthetic monitoring", - "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png", - "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms", - "published_at": "2020-10-04T00:01:41Z", - "updated_at": "2020-08-13T23:22:19Z", - "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations", + "category_1": "Ingest and manage data", + "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "image": "", + "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", + "published_at": "2020-10-03T22:32:05Z", + "updated_at": "2020-10-03T22:32:04Z", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", "document_type": "page", "popularity": 1, - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", + "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.5906, + "_score": 87.68855, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Using monitors", - "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations", - "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you" + "sections": "Ingest and manage data", + "category_0": "Telemetry Data Platform", + "category_1": "Ingest and manage data", + "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", + "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" }, - "id": "5f31d981196a678103fbd731" + "id": "5f24e4ede7b9d28743c8231c" }, { - "category_2": "Get started", - "nodeid": 27301, + "category_2": "NRQL query tutorials", + "nodeid": 36916, "sections": [ - "Kubernetes integration", + "NRQL: New Relic Query Language", "Get started", - "Installation", - "Understand and use data", - "Link apps and services", - "Kubernetes events", - "Logs", - "Troubleshooting", - "Introduction to the Kubernetes integration", - "Get started: Install the Kubernetes integration", - "Why it matters", - "Navigate all your Kubernetes events", - "Bring your cluster logs to New Relic", - "Check the source code", + "NRQL query tools", + "NRQL query tutorials", + "Query APM metric timeslice data with NRQL", + "Why query metric timeslice data?", + "Where to query?", + "How to construct a query", + "How metric timeslice data is converted", + "Attributes", + "Generic queries with the newrelic.timeslice.value metric", + "When to use newrelic.timeslice.value?", + "Get available metrics", + "Facet on a wildcarded metric name segment", + "Recommended aggregator functions", + "Query examples", "For more help" ], - "title": "Introduction to the Kubernetes integration", - "category_0": "Integrations", + "title": "Query APM metric timeslice data with NRQL", + "category_0": "Query your data", "type": "docs", - "category_1": "Kubernetes integration", - "external_id": "4ad996d529753d173874d752239ece44c8e6d43f", - "image": "", - "url": "https://docs.newrelic.com/docs/integrations/kubernetes-integration/get-started/introduction-kubernetes-integration", - "published_at": "2020-10-05T02:06:08Z", - "updated_at": "2020-08-05T01:57:55Z", - "breadcrumb": "Contents / Integrations / Kubernetes integration / Get started", + "category_1": "NRQL: New Relic Query Language", + "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", + "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", + "published_at": "2020-10-03T23:04:50Z", + "updated_at": "2020-09-30T16:27:58Z", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", "document_type": "page", "popularity": 1, - "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", - "body": "New Relic's Kubernetes integration gives you full observability into the health and performance of your environment, no matter whether you run Kubernetes on-premises or in the cloud. With our cluster explorer, you can cut through layers of complexity to see how your cluster is performing, from the heights of the control plane down to applications running on a single pod. one.newrelic.com > Kubernetes cluster explorer: The cluster explorer is our powerful, fully visual answer to the challenges associated with running Kubernetes at a large scale. You can see the power of the Kubernetes integration in the cluster explorer, where the full picture of a cluster is made available on a single screen: nodes and pods are visualized according to their health and performance, with pending and alerting nodes in the innermost circles. Predefined alert conditions help you troubleshoot issues right from the start. Clicking each node reveals its status and how each app is performing. Get started: Install the Kubernetes integration We have an automated installer to help you with many types of installations: servers, virtual machines, and unprivileged environments. It can also help you with installations in managed services or platforms, but you'll need to review a few preliminary notes before getting started. Here's what the automated installer does: Asks for the cluster name and namespace of the integration. Asks for additional setup options, such as Kube state metrics. Asks for the installation method: manifest file or Helm. Generates either the manifest or Helm chart. Read the install docs Start the installer If your New Relic account is in the EU region, access the automated installer from one.eu.newrelic.com. Why it matters Governing the complexity of Kubernetes can be challenging; there's so much going on at any given moment, with containers being created and deleted in a matter of minutes, applications crashing, and resources being consumed unexpectedly. Our integration helps you navigate Kubernetes abstractions across on-premises, cloud, and hybrid deployments. In New Relic, you can build your own charts and query all your Kubernetes data, which our integration collects by instrumenting the container orchestration layer. This gives you additional insight into nodes, namespaces, deployments, replica sets, pods, and containers. one.newrelic.com > Dashboards: Using the chart builder you can turn any query on Kubernetes data to clear visuals. With the Kubernetes integration you can also: Link your APM data to Kubernetes to measure the performance of your web and mobile applications, with metrics such as request rate, throughput, error rate, and availability. Monitor services running on Kubernetes, such as Apache, NGINX, Cassandra, and many more (see our tutorial for monitoring Redis on Kubernetes). Create new alert policies and alert conditions based on your Kubernetes data, or extend the predefined alert conditions. These features are in addition to the data New Relic already reports for containerized processes running on instrumented hosts. Navigate all your Kubernetes events The Kubernetes events integration, which is installed separately, watches for events happening in your Kubernetes clusters and sends those events to New Relic. Events data is then visualized in the cluster explorer. To set it up, check the Kubernetes events box in step 3 of our install wizard, or follow the instructions. one.newrelic.com > Kubernetes cluster explorer > Events: Browse and filter all your Kubernetes events, and dig into application logs and infrastructure data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check the source code This integration is open source software. That means you can browse its source code and send improvements, or you can create your own fork and build it. For more information, see the README. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.52247, + "_score": 82.38547, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Bring your cluster logs to New Relic", - "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ", - "body": " data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check" + "title": "Query APM metric timeslice data with NRQL", + "sections": "Query APM metric timeslice data with NRQL", + "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", + "category_0": "Query your data", + "category_1": "NRQL: New Relic Query Language", + "category_2": "NRQL query tutorials", + "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", + "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" }, - "id": "5cf9564164441f8f472a9169" - }, + "id": "5f2b1349196a67379343fbcf" + } + ], + "/automate-workflows/get-started-new-relic-cli": [ { - "category_2": "Enable and configure", - "nodeid": 38171, + "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png", + "url": "https://developer.newrelic.com/", "sections": [ - "Distributed tracing", - "Get started", - "Enable and configure", - "Other requirements", - "UI and data", - "Trace API", - "Troubleshooting", - "Integrations: Enable distributed tracing", - "Step 1. Install the integration", - "Step 2. (Infinite Tracing) Set up a trace observer", - "Step 3. (Infinite Tracing) Configure the integration", - "Step 4. View traces", - "For more help" + "Mark your calendar for Nerd Days 1.0", + "Get coding", + "Create custom events", + "Add tags to apps", + "Build a Hello, World! app", + "Get inspired", + "Add a table to your app", + "Collect data - any source", + "Automate common tasks", + "Create a custom map view", + "Add a time picker to your app", + "Add custom attributes", + "New Relic developer champions", + "New Relic Podcasts" ], - "title": "Integrations: Enable distributed tracing", - "category_0": "Understand dependencies", - "type": "docs", - "category_1": "Distributed tracing", - "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c", - "image": "", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing", - "published_at": "2020-10-04T05:20:44Z", - "updated_at": "2020-09-30T14:39:10Z", - "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure", + "published_at": "2020-10-06T01:57:17Z", + "title": "New Relic Developers", + "updated_at": "2020-10-06T01:49:17Z", + "type": "developer", + "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Set up a trace observer This section only applies to Infinite Tracing. If you're enabling standard distributed tracing, skip to Step 4. View traces in New Relic One. Infinite Tracing requires you to provision a trace observer that receives your spans. The trace observer examines the spans and keeps the actionable ones. You provision a trace observer in a cluster of services in AWS called New Relic Edge. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. Use our Edge app to set up the trace observer. This app also includes some optional configurations: trace observer monitoring and span attribute trace filter. If you're not sure whether you want to configure these, you can set them up later. Complete the following: 2a. Set up the trace observer endpoint Go to one.newrelic.com. In the menu bar, click Apps, expand Your apps, and then click New Relic Edge. Select an account in the upper-left dropdown. If you have access to multiple account hierarchies, make sure you're in the hierarchy where you want a trace observer. If no trace observers are listed, click New trace observer to add one, insert a descriptive name, select a region, and then click Create. For the trace observer you want to use, go to the Endpoints dropdown and click the adjacent clipboard icon to copy these values: Users Endpoints dropdown value Description For all users (Including OpenCensus Python) For other integrations Copy and hold to use later as YOUR_TRACE_OBSERVER_URL in: 2b. Send test data to the trace observer Step 3. (Infinite Tracing) Configure the integration (not for OpenCensus Python) Only for OpenCensus Python For language agents Copy and hold to use later as YOUR_TRACE_OBSERVER_HOST in Step 3. (Infinite Tracing) Configure the integration. (Optional) If you want to start gathering trace observer metrics, click the toggle for Trace observer monitoring. For details, see trace observer monitoring. (Optional) If you want to customize the span attribute trace filter, click the gear icon below Trace filters to see the current rules. For details, see span attribute filter. 2b. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value you copied in 2a. Set up the trace observer endpoint. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you used the Edge app value For other integrations as YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host parameter to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 97.37776, + "_score": 326.81213, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Step 2. (Infinite Tracing) Set up a trace observer", - "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.", - "body": " passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing: This approach assumes you set sampling to 100% in your telemetry tool so you send all your data to a New Relic trace observer" + "title": "New Relic Developers", + "sections": "New Relic developer champions", + "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add" }, - "id": "5ea0617064441ff137912311" - } - ], - "/build-apps/add-nerdgraphquery-guide": [ + "id": "5d6fe49a64441f8d6100a50f" + }, { "image": "", - "url": "https://developer.newrelic.com/build-apps/", + "url": "https://developer.newrelic.com/automate-workflows/", "sections": [ - "Build apps", - "Guides to build apps", - "Create a \"Hello, World!\" application", - "Permissions for managing applications", - "Set up your development environment", - "Add, query, and mutate data using NerdStorage", - "Add the NerdGraphQuery component to an application", - "Add a time picker to your app", - "Add a table to your app", - "Create a custom map view", - "Publish and deploy apps" + "Automate workflows", + "Guides to automate workflows", + "Quickly tag resources", + "Set up New Relic using Helm charts", + "Automate common tasks", + "Set up New Relic using the Kubernetes operator", + "Automatically tag a simple \"Hello World\" Demo across the entire stack", + "Set up New Relic using Terraform" ], - "published_at": "2020-10-05T01:55:27Z", - "title": "Build apps", - "updated_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:07:11Z", + "title": "Automate workflows", + "updated_at": "2020-10-06T02:07:11Z", "type": "developer", - "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d", + "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871", "document_type": "page", "popularity": 1, - "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One   Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build", + "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 753.9162, + "_score": 306.973, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Build apps", - "sections": "Add the NerdGraphQuery component to an application", - "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your" + "sections": "Set up New Relic using Helm charts", + "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment" }, - "id": "5efa999d64441fc0f75f7e21" + "id": "5efa999c196a67dfb4766445" }, { + "category_2": "UI and data", + "nodeid": 34316, "sections": [ - "Map page views by region in a custom app", - "Before you begin", - "New Relic terminology", - "Build a custom app with a table chart", - "Query your browser data", - "Create and serve a new Nerdpack", - "Review your app files and view your app locally", - "Hard code your account ID", - "Import the TableChart component", - "Add a table with a single row", - "Customize the look of your table (optional)", - "Get your data into that table", - "Make your app interactive with a text field", - "Import the TextField component", - "Add a row for your text field", - "Build the text field object", - "Get your data on a map", - "Install Leaflet", - "Add a webpack config file for Leaflet", - "Import modules from Leaflet", - "Import additional modules from New Relic One", - "Get data for the map", - "Customize the map marker colors", - "Set your map's default center point", - "Add a row for your map", - "Replace \"Hello\" with the Leaflet code" - ], - "title": "Map page views by region in a custom app", - "type": "developer", - "tags": [ - "custom app", - "map", - "page views", - "region", - "nerdpack" + "Use New Relic One", + "Get started", + "Core concepts", + "UI and data", + "Workloads", + "Build on New Relic One", + "Entity explorer: View performance across apps, services, hosts", + "View entities", + "Health (alert) status", + "Filter by tag or entity name", + "Entity data retention", + "For more help" ], - "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb", - "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png", - "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/", - "published_at": "2020-10-05T01:53:44Z", - "updated_at": "2020-09-17T01:48:42Z", + "title": "Entity explorer: View performance across apps, services, hosts", + "category_0": "New Relic One", + "type": "docs", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "external_id": "70c4dd2b7c228d80145ed4e4c120412a652346d8", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-entity-explorer.png", + "url": "https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "published_at": "2020-10-06T04:58:32Z", + "updated_at": "2020-10-06T04:58:32Z", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data", "document_type": "page", "popularity": 1, - "info": "Build a New Relic app showing page view data on a world map.", - "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return

Hello, pageview-app-nerdlet Nerdlet!

; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
{ this.setState({ countryCode: event.target.value }); }} />
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( {results.map((pt, i) => { const center = [pt.lat, pt.lng]; return ( { alert(JSON.stringify(pt)); }} /> ); })} ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "body": "Use the entity explorer to access the performance data from all your monitored applications, services, and hosts. For more about entities, see What is an entity? View entities To use the entity explorer: Go to one.newrelic.com and select Entity explorer. Your monitored entities are on the left. You may need to scroll your list of entities to see them all. one.newrelic.com > Entity explorer: Use the entity explorer to locate and examine the entities you monitor. The entity explorer brings together data reported from across all of New Relic. Entity categories include: Services: APM-monitored applications and services monitored. Hosts: your monitored infrastructure (your servers and hosts). Mobile applications: your mobile apps. Browser applications: your front-end browser apps. Integration-reported data: data from services monitored by our integrations, including our on-host integrations (like Kubernetes, StatsD, and NGINX), and cloud platform integrations, like Amazon, Microsoft Azure, and Google Cloud Platform (GCP). Health (alert) status The entity explorer shows a color-coded alert status for entities. For example, you may see a red alert status indicating a critical violation in progress. To see what an alert status means, mouse over it. To see details about an entity's alerting status, select the entity. NRQL alert conditions aren't used to determine alert status because they aren't associated with specific entities. Starting June 8, 2020, New Relic One will not continue to display any APM application that hasn't reported data for 93 days. To match our published APM data retention guidelines, applications that have not reported data will be available within the New Relic UI for 90 days. After 90 days, those applications will be removed from the UI; however, key metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags at the top of the page. For example, you may want to filter down to only entities tagged with production, or only entities with a specific AWS region tag. For more about tags, see Tagging. Filter by entity name: Use Search services by name at the top of the page. Entity data retention Availability of data depends on these factors: Scope Data retention Entity explorer and search In the UI, data is available for eight days after an entity no longer exists, with one exception: data reported by integrations, such as Amazon AWS, is only available for one day after an entity ceases to exist. Our database (accessible via NRQL query) For querying our database (for example, via the query builder or data explorer), availability is dependent on the data retention for that data type. As a result of these factors, a short-lived entity (like a cloud host) may not be available in the entity explorer list or via search, but its data may still be available via NRQL query. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 361.3141, + "_score": 210.46011, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Map page views by region in a custom app", - "sections": "Query your browser data", - "info": "Build a New Relic app showing page view data on a world map.", - "tags": "custom app", - "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace" + "title": "Entity explorer: View performance across apps, services, hosts", + "sections": "Use New Relic One", + "info": "Use New Relic's entity explorer to see all your monitored entities in one place and explore the reported data. ", + "category_0": "New Relic One", + "category_1": "Use New Relic One", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/new-relic-one/use-new-relic-one/ui-data/entity-explorer-view-performance-across-apps-services-hosts", + "body": " metrics will continue to be available via the New Relic REST API based on subscription level. For more information, see New Relic's Explorers Hub post. Filter by tag or entity name There are a couple ways to filter down to specific types of entities: Filter entities by tags: Use Filter with tags", + "breadcrumb": "Contents / New Relic One / Use New Relic One / UI and data" }, - "id": "5efa993c196a67066b766469" + "id": "5d244a5864441fe577a72a1b" }, { - "category_2": "Alert conditions", - "nodeid": 9231, + "nodeid": 6276, "sections": [ "New Relic Alerts", "Get started", @@ -6067,141 +6325,97 @@ "Rules, limits, and glossary", "Alerts and Nerdgraph", "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", + "REST API calls for alerts", + "Available data and functions via API", + "Conditions excluded from the REST API", + "Using a Personal API key with the REST API", + "Notification channels", + "Conditions for APM, Browser, Mobile", + "Conditions for NRQL", + "Conditions for external services", + "Conditions for Synthetic monitoring", + "Conditions for plugins", + "Alert activity: Events, violations, incidents", + "Alert entity conditions", "For more help" ], - "title": "Create NRQL alert conditions", + "title": "REST API calls for alerts", "category_0": "Alerts and Applied Intelligence", "type": "docs", "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-10-04T08:33:54Z", - "updated_at": "2020-10-04T08:33:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "external_id": "f696d6446d171b8db8c84991bb88c9690b5d3f5b", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "published_at": "2020-10-06T02:37:17Z", + "updated_at": "2020-10-06T02:37:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / REST API alerts", "document_type": "page", "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to use the REST API Explorer with alerts.", + "body": "Our REST API (v2) allows you to configure settings for alerts. The API Explorer also includes the curl request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. You can also create alert conditions in the UI. For infrastructure alerting, see REST API for infrastructure monitoring alerts. Available data and functions via API REST API functions Comments View account data In general, any role can use the account's REST API key or a Personal API key with GET > List functions to view alerts data. The account Owner and Admins may use their API key. List output will be paginated. Available functions include: Alert policies Notification channels Conditions for APM, Browser, and Mobile (Some limitations apply.) Conditions for external services Conditions for Synthetic monitoring Conditions for Plugins Conditions for NRQL (Some limitations apply.) Events Violations Incidents Maintain account data You may have an Owner or Admin role in your account and an Admin user's API key or have a custom role that grants permissions to manage Alerts and a Personal API key in order to use any maintenance function, including POST > Create, PUT > Add, PUT > Update, and DELETE. Conditions excluded from the REST API These types of conditions do not have available endpoints in the API: APM: Web transaction percentiles, conditions targeting labels, and baselines NRQL: Baselines Using a Personal API key with the REST API To use a Personal API key in any of the examples below, replace 'X-Api-Key:{api_key}' with 'Api-Key:{personal_api_key}'. Alert policies These API functions include links to the API Explorer, where you can create, delete, or list policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create new policies To add new policies, use your Admin user's API key or Personal API key, and include these two values in the API call: Required values Definition Incident incident_preference Determines how Alerts will create incidents and group violations. This must be one of the following: PER_POLICY (default): Roll up by policy. PER_CONDITION: Roll up by condition. PER_CONDITION_AND_TARGET: Roll up by target and condition. Policy name The policy name is required. Leaving it unchanged will create a policy called string. API Explorer: Alerts Policies > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_policies.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"policy\": { \"incident_preference\": \"string\", \"name\": \"string\" } }' Update policies Use this API to update an existing policy's name and incident_preference. You'll need your Admin user's API key or Personal API key. Required values Definition id Required. To find a policy's ID, use either of these options: From the UI: On a policy's UI page, find the ID under the policy name. With the API: Use the List policies API. Incident incident_preference Determines how alerts will create incidents and group violations. Must be one of the following: PER_POLICY (default): Roll up by policy. PER_CONDITION: Roll up by condition. PER_CONDITION_AND_TARGET: Roll up by target and condition. Policy name Required. If you do not change the name, it defaults to a policy called string. To find a policy's exact name, use the List policies API. API Explorer: Alerts Policies > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_policies/{id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"policy\": { \"incident_preference\": \"string\", \"name\": \"string\" } }' Delete existing policies To delete an existing policy, use your Admin user's API key or Personal API key, and include the policy_id (available from API Explorer: Alerts Policies > GET > List) in the API call: API Explorer: Alerts Policies > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing policies To view a list of existing policies for your account, use your API key or Personal API key, and include these optional values in the API call: Optional policy name filter Optional pagination value API Explorer: Alerts Policies > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_policies.json' \\ -H 'X-Api-Key:{api_key}' -i Notification channels These API functions include links to the API Explorer, where you can create, delete, or list Alerts notification channels. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create new notification channels To add new notification channels, use your Admin user's API key or Personal API keyand include these values in the API call: New channel's name Type of channel Configuration values The API Explorer shows the format for required configuration values for each type of notification channel. API Explorer: Alerts Channels > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"channel\": { \"name\": \"string\", \"type\": \"string\", \"configuration\": \"hash\" } }' The \"hash\" place holder in this example must be replaced by one of the following JSON blocks with the appropriate values substituted: Email channel { \"recipients\" : \"test@google.com\", \"include_json_attachment\" : true } OpsGenie channel { \"api_key\": \"abc123\", \"teams\": \"team1\", \"tags\": \"tag1\", \"recipients\": \"me@me.com\" } Slack channel { \"url\": \"http://test.com\", \"channel\": \"channel1\" } VictorOps channel { \"key\": \"mykey\", \"route_key\": \"theroute\" } PagerDuty channel { \"service_key\": \"myservicekey\" } Webhook (json) channel This example shows the default payload inserted. (The payload attribute is optional.) The payload can be customized to have different keys than the ones shown and will be sent with the $ prefixed attributes interpolated prior to delivery. The condition_id is deprecated. Instead, use condition_family_id. { \"base_url\": \"http://test.com\", \"auth_username\": \"username\", \"auth_password\": \"password\", \"payload_type\": \"application/json\", \"headers\": { \"header1\": \"test\", \"header2\": \"test\" } \"payload\": { \"account_id\": \"$ACCOUNT_ID\", \"account_name\": \"$ACCOUNT_NAME\", \"closed_violations_count_critical\": \"$CLOSED_VIOLATIONS_COUNT_CRITICAL\", \"closed_violations_count_warning\": \"$CLOSED_VIOLATIONS_COUNT_WARNING\", \"condition_family_id\": \"$CONDITION_FAMILY_ID\", \"condition_id\": \"$CONDITION_ID\", \"condition_name\": \"$CONDITION_NAME\", \"current_state\": \"$EVENT_STATE\", \"details\": \"$EVENT_DETAILS\", \"duration\": \"$DURATION\", \"event_type\": \"$EVENT_TYPE\", \"incident_acknowledge_url\": \"$INCIDENT_ACKNOWLEDGE_URL\", \"incident_id\": \"$INCIDENT_ID\", \"incident_url\": \"$INCIDENT_URL\", \"open_violations_count_critical\": \"$OPEN_VIOLATIONS_COUNT_CRITICAL\", \"open_violations_count_warning\": \"$OPEN_VIOLATIONS_COUNT_WARNING\", \"owner\": \"$EVENT_OWNER\", \"policy_name\": \"$POLICY_NAME\", \"policy_url\": \"$POLICY_URL\", \"runbook_url\": \"$RUNBOOK_URL\", \"severity\": \"$SEVERITY\", \"targets\": \"$TARGETS\", \"timestamp\": \"$TIMESTAMP\", \"violation_callback_url\": \"$VIOLATION_CALLBACK_URL\", \"violation_chart_url\": \"$VIOLATION_CHART_URL\" } } Webhook (x-www-form-urlencoded) channel This example shows the default payload inserted. (The payload attribute is optional.) The payload can be customized to have different keys than the ones shown and will be sent with the $ prefixed attributes interpolated prior to delivery. The condition_id is deprecated. Instead, use condition_family_id. { \"base_url\": \"http://test.com\", \"auth_username\": \"username\", \"auth_password\": \"password\", \"payload_type\": \"application/x-www-form-urlencoded\", \"headers\": { \"header1\": \"test\", \"header2\": \"test\" }, \"payload\": { \"account_id\": \"$ACCOUNT_ID\", \"account_name\": \"$ACCOUNT_NAME\", \"closed_violations_count_critical\": \"$CLOSED_VIOLATIONS_COUNT_CRITICAL\", \"closed_violations_count_warning\": \"$CLOSED_VIOLATIONS_COUNT_WARNING\", \"condition_family_id\": \"$CONDITION_FAMILY_ID\", \"condition_id\": \"$CONDITION_ID\", \"condition_name\": \"$CONDITION_NAME\", \"current_state\": \"$EVENT_STATE\", \"details\": \"$EVENT_DETAILS\", \"duration\": \"$DURATION\", \"event_type\": \"$EVENT_TYPE\", \"incident_acknowledge_url\": \"$INCIDENT_ACKNOWLEDGE_URL\", \"incident_id\": \"$INCIDENT_ID\", \"incident_url\": \"$INCIDENT_URL\", \"open_violations_count_critical\": \"$OPEN_VIOLATIONS_COUNT_CRITICAL\", \"open_violations_count_warning\": \"$OPEN_VIOLATIONS_COUNT_WARNING\", \"owner\": \"$EVENT_OWNER\", \"policy_name\": \"$POLICY_NAME\", \"policy_url\": \"$POLICY_URL\", \"runbook_url\": \"$RUNBOOK_URL\", \"severity\": \"$SEVERITY\", \"targets\": \"$TARGETS\", \"timestamp\": \"$TIMESTAMP\", \"violation_callback_url\": \"$VIOLATION_CALLBACK_URL\", \"violation_chart_url\": \"$VIOLATION_CHART_URL\" } } Delete existing notification channels To delete an existing notification channels, use your Admin user's API key or Personal API key, and include the channel_id (available from API Explorer: Alerts Channels > GET > List) in the API call: API Explorer: Alerts Channels > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_channels/{channel_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing notification channels To view a list of existing notification channels for your account, use your REST API key, Admin user's API key, or Personal API key and an optional pagination value in the API call. API Explorer: Alerts Channels > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_channels.json' \\ -H 'X-Api-Key:{api_key}' -i Update notification channels associated with policies You can associate a policy with one or more notification channels. You can also associate a notification channel with one or more policies. To add notification channels to policies, use your Admin user's API key or Personal API key and these values in the API call: A policy_id value (available from API Explorer: Alerts Policies > GET > List) One or more channel_id values in an array, separated by commas or a new line (available from API Explorer: Alerts Channels > GET > List) API Explorer: Alerts Policy Channels > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_policy_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -G -d 'policy_id=policy_id&channel_ids=channel_id' Delete notification channels associated with policies You can associate a policy with one or more notification channels. You can also associate a notification channel with one or more alert policies. To remove a policy from a channel, or to remove a channel from a policy, use your Admin user's API key or Personal API keyand these values in the API call: The policy_id (available from API Explorer: Alerts Policies > GET > List) The channel_id (available from API Explorer: Alerts Channels > GET > List) API Explorer: Alerts Policy Channels > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_policy_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -d 'channel_id={channel_id}&policy_id={policy_id}' Conditions for APM, Browser, Mobile These API functions include links to the API Explorer, where you can create, update, delete, or list policy conditions. These calls are for conditions with these types of entities: APM: Apps and key transactions Browser: Apps and key transactions Mobile: Mobile apps Exception: The following APM conditions are not available from this API endpoint: Conditions targeting labels (dynamic targeting) Web transaction percentile conditions Baseline conditions The API Explorer provides information about other types of conditions using separate endpoints, including external services (APM and Mobile), plugins, and Synthetic monitoring. Consider all types of alert conditions when searching or updating. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create conditions for policies To add conditions to policies, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric\": \"string\", \"gc_metric\": \"string\", \"condition_scope\": \"string\", \"violation_close_timer\": integer, \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"user_defined\": { \"metric\": \"string\", \"value_function\": \"string\" } } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Conditions > GET > List. Update conditions for policies To update conditions for policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: Alerts Conditions > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric\": \"string\", \"metric\": \"string\", \"gc_metric\": \"string\", \"condition_scope\": \"string\", \"violation_close_timer\": integer, \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"user_defined\": { \"metric\": \"string\", \"value_function\": \"string\" } } }' Delete conditions from policies To delete conditions from policies, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts Conditions > GET > List) API Explorer: Alerts Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing conditions for policies To view a list of existing conditions for your policy, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for NRQL These API functions include links to the API Explorer, where you can create, update, delete, or list NRQL conditions for your policies. Exception: NRQL baseline conditions are not available from this endpoint. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create NRQL conditions for policies Recommendation: Due to the way NRQL data is aggregated, set the nrql[since_value] to 3 or higher to prevent false positives. This equates to the Evaluation Offset value in the Alerts Condition UI. API Explorer: Alerts Nrql Conditions > POST > Create To create NRQL conditions for policies: curl -X POST 'https://api.newrelic.com/v2/alerts_nrql_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"nrql_condition\": { \"type\": \"string\", \"name\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean, \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"value_function\": \"string\", \"nrql\": { \"query\": \"string\", \"since_value\": \"string\" } } }' If you set nrql[since_value] to 3 and nrql[query] to SELECT count FROM myEvent, New Relic evaluates the following query against the terms[threshold] value once per minute: SELECT count FROM myEvent SINCE 3 minutes ago UNTIL 2 minutes ago If you set type as outlier, you can omit the value_function. However, two additional fields are required: expected_groups and ignore_overlap. For more information, see Alerts Conditions API field names. If you omit type or set it as static, it will default to standard NRQL alerting. Update NRQL conditions for policies Recommendation: Due to the way NRQL data is aggregated, set the nrql[since_value] to 3 or higher to prevent false positives. This allows three minutes to aggregate data, and equates to the Evaluation Offset value in the Alerts Condition UI. To update NRQL conditions for policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: [external link] Alerts Nrql Conditions > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Nrql Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_nrql_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"nrql_condition\": { \"name\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean, \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"value_function\": \"string\", \"nrql\": { \"query\": \"string\", \"since_value\": \"string\" } } }' Delete NRQL conditions for policies To delete NRQL conditions from policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: [external link] Alerts Nrql Conditions > GET > List) API Explorer: Alerts Nrql Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_nrql_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing NRQL conditions for policies To view a list of existing conditions for your alert policy, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Nrql Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_nrql_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for external services These API functions include links to the API Explorer, where you can create, update, delete, or list policy conditions. These calls are for conditions for external services. The API calls can be used with APM and Mobile apps. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. External services: Create conditions for policies To add conditions for external services to policies that have APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required external_service_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts External Service Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_external_service_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"external_service_condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"external_service_url\": \"string\", \"metric\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ] } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts External Service Conditions > GET > List. External services: Update conditions for policies To update conditions for external services to policies that have APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The external service condition's id (available from API Explorer: Alerts External Service Conditions > GET > List) The required external_service_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts External Service Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_external_service_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"external_service_condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"external_service_url\": \"string\", \"metric\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ] } }' External services: Delete conditions from policies To delete conditions for external services from policies with APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts External Service Conditions > GET > List) API Explorer: Alerts External Service Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_external_service_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i External services: List existing conditions for policies To view a list of existing conditions for policies with external service apps (APM or Mobile), use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts External Service Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_external_service_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for Synthetic monitoring These API functions include links to the API Explorer, where you can create, update, delete, or list conditions for your alert policies. The API calls can be used with Synthetic monitoring. Synthetics: Create conditions for policies To add conditions to policies for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required synthetics_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Synthetics Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_synthetics_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"synthetics_condition\": { \"name\": \"string\", \"monitor_id\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Synthetics Conditions > GET > List. Synthetic monitoring: Update conditions for policies To update policy conditions for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Synthetics Conditions > GET > List) The required synthetics_condition values in the API call (described in the API Explorer page to create alert conditions for Synthetics and in the Alerts conditions API glossary) API Explorer: Alerts Synthetics Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"synthetics_condition\": { \"name\": \"string\", \"monitor_id\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean } }' Synthetic monitoring: Delete conditions from policies To delete policy conditions for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts Synthetics Conditions > GET > List) API Explorer: Alerts Synthetics Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i Synthetic monitoring: List existing conditions for policies To view a list of existing policy conditions for Synthetic monitoring, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Synthetics Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_synthetics_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id=policy_id' Conditions for plugins These API functions include links to the API Explorer, where you can create, update, delete, or list conditions for your alert policies. The API calls can be used with plugins from New Relic's Plugin Central. Plugins: Create conditions for policies To add conditions to policies for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required plugins_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Plugins Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_plugins_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"plugins_condition\": { \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric_description\": \"string\", \"metric\": \"string\", \"value_function\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"plugin\": { \"id\": \"string\", \"guid\": \"string\" } } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Plugins Conditions > GET > List. Plugins: Update conditions for policies To update policy conditions for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Plugins Conditions > GET > List) The required plugins_condition values in the API call (described in the API Explorer page to create alert conditions for plugins and in the Alerts conditions API glossary) API Explorer: Alerts Plugins Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_plugins_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"plugins_condition\": { \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric_description\": \"string\", \"metric\": \"string\", \"value_function\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"plugin\": { \"id\": \"string\", \"guid\": \"string\" } } }' Plugins: Delete conditions from policies To delete conditions from policies for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Plugins Conditions > GET > List) API Explorer: Alerts Plugins Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_plugins_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i Plugins: List existing conditions for policies To view a list of existing conditions for policies with plugin components or instances, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Plugins Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_plugins_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Alert activity: Events, violations, incidents These API functions include links to the API Explorer, where you can view information about events, violations, and incidents for your alert policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. List Events To view events for entities monitored by APM, Browser, Mobile, Plugins, Synthetic monitoring, and Alerts, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key Other optional values to use as filters (described in the API Explorer page) that depend on the type of product (browser monitoring, mobile monitoring, etc.), entity (as apps or key transactions for APM, synthetic monitoring, etc.), and type of event (notification, deployment, instrumentation, etc.) An optional pagination value API Explorer: Alerts Events > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_events.json' \\ -H 'X-Api-Key:{api_key}' -i List Violations To view violations for any entity monitored for your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An optional flag to show only those violations that are currently open An optional pagination value API Explorer: Alerts Violations > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_violations.json' \\ -H 'X-Api-Key:{api_key}' -i To find policy, condition, and incident information: take the IDs found in the links section in the violations property and place them into the URLs contained in the outer links property of the payload. List Incidents To view incidents for any entity monitored for your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An optional flag to show only those incidents that are currently open An optional flag to exclude violation data from response An optional pagination value API Explorer: Alerts Incidents > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_incidents.json' \\ -H 'X-Api-Key:{api_key}' -i Show Incident To show a single incident associated with your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An incident ID API Explorer: Alerts Incidents > GET > Show curl -X GET 'https://api.newrelic.com/v2/alerts_incidents/{id}.json' \\ -H 'X-Api-Key:{api_key}' -i Acknowledge Incident To acknowledge an incident associated with your account, include these values in the API call: Your Admin user's API key or Personal API key. An incident ID API Explorer: Alerts Incidents > PUT > Acknowledge curl -X PUT 'https://api.newrelic.com/v2/alerts_incidents/{id}/acknowledge.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' Close Incident To close an incident associated with your account, include these values in the API call: Your Admin user's API key or Personal API key. An incident ID API Explorer: Alerts Incidents > PUT > Close curl -X PUT 'https://api.newrelic.com/v2/alerts_incidents/{id}/close.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' Alert entity conditions These API functions include links to the API Explorer, where you can list, add and remove entities in the conditions for your alert policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. List condition by entity To view the conditions an entity is part of for APM, Browser, Mobile, key transactions, and Plugins, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key The entity_id This is the specific entity (alert target) to be monitored. The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > GET > list curl -X GET 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -G -d 'entity_type={entity_type}' Add an entity to a condition To add an entity to a condition, include these values in the API call: Your Admin user's API key or Personal API key The entity_id This is the entity (alert target) to be monitored. It is the numeric ID for the APM application, browser app, plugin, key transaction, or mobile app. The condition_id (available from API Explorer: Alerts Conditions > GET > List) The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > PUT > Add curl -X PUT 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' \\ -G -d 'entity_type={entity_type}&condition_id={condition_id}' Remove an entity from a condition To remove an entity being monitored from a condition, include these values in the API call: Your Admin user's API key or Personal API key The entity_id This is the specific monitored entity (alert target) to be removed. It is the numeric ID for the APM application, browser app, plugin, key transaction, or mobile app. The condition_id (available from API Explorer: Alerts Conditions > GET > List) The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > DELETE > Remove curl -X DELETE 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -G -d 'entity_type={entity_type}&condition_id={condition_id}' For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 276.99802, + "_score": 203.52234, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Sum of query results (limited or intermittent data)", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "category_0": "Alerts and Applied Intelligence", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": " 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you" + "title": "REST API calls for alerts", + "sections": "New Relic Alerts", + "info": "Read about how to use the REST API Explorer with alerts.", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "body": " { "recipients" : "test@google.com", "include_json_attachment" : true } OpsGenie channel { "api_key": "abc123", "teams": "team1", "tags": "tag1", "recipients": "me@me.com" } Slack channel { "url": "http://test.com", "channel": "channel1" } VictorOps channel { "key": "mykey", "route_key": "theroute", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / REST API alerts" }, - "id": "5f2d992528ccbc489d88dfc1" + "id": "5f344a7c196a677172fbd6e5" }, { "sections": [ - "Query and store data", - "Components overview", - "Query components", - "Mutation components", - "Static methods", - "NrqlQuery" + "Quickly tag a set of resources", + "Before you begin", + "Install the New Relic CLI", + "Linux", + "macOS", + "Windows", + "Create your New Relic CLI profile", + "Search for an entity", + "Add tags and tag lists to your entity", + "Note", + "Check that the tags are there", + "Tip", + "Next steps" ], - "title": "Query and store data", + "title": "Quickly tag a set of resources", "type": "developer", "tags": [ - "nerdgraph query components", - "mutation components", - "static methods" - ], - "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-01T01:42:02Z", - "document_type": "page", - "popularity": 1, - "info": "Reference guide for SDK query components using NerdGraph", - "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
    ({data, error}) => { if (error) { return
  • Failed to retrieve list: {error.message}
  • ; } return data.map((account) => {
  • {account.name}
  • }); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 264.79504, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Query and store data", - "sections": "Components overview", - "info": "Reference guide for SDK query components using NerdGraph", - "tags": "nerdgraph query components", - "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query" - }, - "id": "5efa989e28ccbc2f15307deb" - }, - { - "category_2": "NRQL query tutorials", - "nodeid": 36916, - "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", - "For more help" + "tags", + "new relic CLI" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-10-03T23:04:50Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "image": "", + "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", + "published_at": "2020-10-06T02:07:11Z", + "updated_at": "2020-08-14T01:45:08Z", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 263.82214, + "_score": 177.14964, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "title": "Quickly tag a set of resources", + "sections": "Install the New Relic CLI", + "info": "Add tags to applications you instrument for easier filtering and organization.", + "tags": "new relic CLI", + "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5efa999d64441fa74a5f7e2d" } ], "/explore-docs/nr1-subscription": [ @@ -6227,7 +6441,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6235,7 +6449,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 246.72867, + "_score": 240.92737, "_version": null, "_explanation": null, "sort": null, @@ -6284,395 +6498,142 @@ "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 158.38435, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Step 1. Install the newrelic-lambda-cli tool", - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" - }, - "id": "5f6c67a464441f3a75eb72d3" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:47:12Z", - "document_type": "page", - "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 133.19662, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" - }, - "id": "5efa989ee7b9d2024b7bab97" - }, - { - "nodeid": 37686, - "sections": [ - "AWS Lambda monitoring", - "Get started", - "Enable Lambda monitoring", - "UI and data", - "Troubleshooting", - "Update serverless monitoring for AWS Lambda", - "Update our Lambda integration via CLI", - "Update Layers via CLI", - "Update a manual Serverless Application Repository install", - "Enabling log management", - "For more help" - ], - "title": "Update serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", - "type": "docs", - "category_1": "AWS Lambda monitoring", - "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", - "image": "", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", - "published_at": "2020-10-03T16:24:33Z", - "updated_at": "2020-09-24T13:54:59Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", - "document_type": "page", - "popularity": 1, - "info": "How to update our Serverless monitoring for AWS Lambda. ", - "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 129.68701, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Update our Lambda integration via CLI", - "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" - }, - "id": "5f6ca534196a67b08750423e" - }, - { - "image": "", - "url": "https://developer.newrelic.com/explore-docs/nr1-common/", - "sections": [ - "New Relic One CLI common commands", - "Command details", - "nr1 help", - "See commands and get details", - "Usage", - "Arguments", - "Examples", - "nr1 update", - "Update your CLI", - "nr1 create", - "Create a new component", - "Options", - "nr1 profiles", - "Manage your profiles keychain", - "Commands", - "nr1 autocomplete", - "See autocomplete installation instructions", - "nr1 nrql", - "Query using NRQL" - ], - "published_at": "2020-10-05T01:56:44Z", - "title": "New Relic One CLI common commands", - "updated_at": "2020-08-14T01:48:10Z", - "type": "developer", - "external_id": "503e515e1095418f8d19329517344ab209d143a4", - "document_type": "page", - "popularity": 1, - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.715454, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "New Relic One CLI common commands", - "sections": "New Relic One CLI common commands", - "info": "An overview of common commands you can use with the New Relic One CLI.", - "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" - }, - "id": "5f28bd6ae7b9d267996ade94" - } - ], - "/collect-data/query-data-nrql": [ - { - "category_2": "Alert conditions", - "nodeid": 9231, - "sections": [ - "New Relic Alerts", - "Get started", - "Alert policies", - "Alert conditions", - "Alert violations", - "Alert Incidents", - "Alert notifications", - "Troubleshooting", - "Rules, limits, and glossary", - "Alerts and Nerdgraph", - "REST API alerts", - "Create NRQL alert conditions", - "Create NRQL alert condition", - "Alert threshold types", - "NRQL alert syntax", - "Sum of query results (limited or intermittent data)", - "Set the loss of signal threshold", - "Offset the query time window", - "NRQL alert threshold examples", - "Nested Aggregation NRQL Alerts", - "Create a description", - "For more help" - ], - "title": "Create NRQL alert conditions", - "category_0": "Alerts and Applied Intelligence", - "type": "docs", - "category_1": "New Relic Alerts", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "external_id": "956a7a0b84d2afac5e6236df3143085ebc4f7459", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/signal-loss-ui.png", - "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "published_at": "2020-10-04T08:33:54Z", - "updated_at": "2020-10-04T08:33:54Z", - "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / Alert conditions", - "document_type": "page", - "popularity": 1, - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Loss of signal Use the signal loss settings to: Set the signal loss time limit Close all current open violations Open new violations To learn more about signal loss and how to request access to it, see this announcement. Condition settings Use the Condition settings to: Create a concise and descriptive condition name. Choose how long data is collected before it's aggregated. Adjust the evaluation offset. Select whether or not to fill gaps with data and what values to use. To learn more about gap filling and how to request access to it, see this announcement. Provide a text description for the condition that will be included in violations and notifications. Sometimes a signal will have an aggregation window that does not contain data. This creates a gap in the data that is evaluated. This feature allows you to fill gaps in data with either the last known or a custom value that you choose. It is common to use a zero as the custom value. The default behavior is to leave gaps empty, which will restart the evaluation duration timer. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Set the loss of signal threshold Go to one.newrelic.com, click Alerts & AI, in the left sidebar click Policies, select a policy, then Create a condition. Loss of signal is only available for NRQL conditions. A loss of signal is a period of time when no data is received by New Relic. Sometimes, there's no data being sent and sometimes data is being lost. You can use loss of signal to customize whether and when you'll be notified after your last known signal. To create a NRQL alert that uses loss of signal: When creating a condition, under Select a product, click NRQL, then click Next, define thresholds. Create a NRQL query that returns the values you want to alert on. For Threshold type, select Static or Baseline. Click + Add lost signal threshold, then set the time in minutes or seconds after which the signal will be considered lost. When the signal is lost, check the boxes to Close all current open violations and Open new \"lost signal\" violation. Make sure you name your condition and then save it. You can use a signal loss to close all of your currently open violations, open a lost signal violation, or do both. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Nested Aggregation NRQL Alerts Nested aggregation queries are a powerful way to query your data and open up new possibilities to alert on. However, they have a few restrictions that are important to note. Nested queries with a non-faceted innermost query are not currently supported Without a FACET, the inner query will produce a single result thus giving the outer query nothing to aggregate. Registering the inner query alone would be equivalent. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu) ​​​​​ Queries at all levels must have the same aggregation window Assuming the alert is registered with an aggregation window of 1 minute, this inner query would produce 2 smaller windows of width 30 seconds which could be aggregated by the outer query. However, this is not currently supported. SELECT max(cpu) FROM (FROM Event SELECT min(cpuTime) as cpu TIMESERIES 30 seconds)​​ Signal loss is not yet supported for nested queries For more information on signal loss, see NerdGraph API: Loss of signal and gap filling. Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 151.76105, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Create NRQL alert conditions", - "sections": "NRQL alert syntax", - "info": "How to define thresholds that trigger alert notifications based on your NRQL queries.", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions", - "body": "'s health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL" - }, - "id": "5f2d992528ccbc489d88dfc1" - }, - { - "category_2": "Get started", - "nodeid": 11431, - "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Introduction to NRQL, New Relic's query language", - "What is NRQL?", - "Where can you use NRQL?", - "What data can you query with NRQL?", - "Start using NRQL", - "NRQL query examples", - "NRQL syntax", - "For more help" - ], - "title": "Introduction to NRQL, New Relic's query language", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "external_id": "d44be2c7df7addda8679b4c842015223cfcbd1a3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-view-chart-nrql-query_0.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "published_at": "2020-10-03T15:18:02Z", - "updated_at": "2020-09-24T08:40:20Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started", - "document_type": "page", - "popularity": 1, - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax, clauses, and functions. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days:​ SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 114.136505, + "_score": 148.51971, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Introduction to NRQL, New Relic's query language", - "sections": "What data can you query with NRQL?", - "info": "An introduction to New Relic Query Language (NRQL) and how to use it.", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language", - "body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This resource explains what NRQL is, when and how you can use it, and basic syntax rules. For more detailed information on querying, including a listing of clauses and functions and example queries, see NRQL syntax", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started" + "sections": "Step 1. Install the newrelic-lambda-cli tool", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" }, - "id": "5f2abd47196a67747343fbe1" + "id": "5f6c67a464441f3a75eb72d3" }, { - "category_2": "Custom events", - "nodeid": 13661, "sections": [ - "Event data sources", - "Default events", - "Custom events", - "Data requirements and limits for custom event data", - "General requirements", - "Reserved words", - "Additional Browser PageAction requirements", - "Additional Event API requirements", - "Event type limits", - "For more help" + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" ], - "title": "Data requirements and limits for custom event data", - "category_0": "Insights", - "type": "docs", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e", + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", "image": "", - "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "published_at": "2020-10-03T18:06:58Z", - "updated_at": "2020-09-27T17:50:31Z", - "breadcrumb": "Contents / Insights / Event data sources / Custom events", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-08-14T01:47:12Z", "document_type": "page", "popularity": 1, - "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ", - "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The payload must be encoded as UTF-8. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 112.42871, + "_score": 130.98296, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Data requirements and limits for custom event data", - "sections": "Event data sources", - "category_1": "Event data sources", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits", - "body": " may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size", - "breadcrumb": "Contents / Insights / Event data sources / Custom events" + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" }, - "id": "59f4354f4bb81c2ea8b80d0a" + "id": "5efa989ee7b9d2024b7bab97" }, { - "category_2": "Ingest APIs", - "nodeid": 35526, + "nodeid": 37686, "sections": [ - "Ingest and manage data", + "AWS Lambda monitoring", "Get started", - "Understand data", - "Manage data", - "Ingest APIs", - "Metric API limits and restricted attributes", - "Endpoint requirements and maximum limits", - "Rate limit violations", - "Restricted attributes", + "Enable Lambda monitoring", + "UI and data", + "Troubleshooting", + "Update serverless monitoring for AWS Lambda", + "Update our Lambda integration via CLI", + "Update Layers via CLI", + "Update a manual Serverless Application Repository install", + "Enabling log management", "For more help" ], - "title": "Metric API limits and restricted attributes", - "category_0": "Telemetry Data Platform", + "title": "Update serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "Ingest and manage data", - "external_id": "32ae97feb47a5a92dc7bf9809d396ef133b8b5a7", + "category_1": "AWS Lambda monitoring", + "external_id": "9241e43c2db3e0298407449d530fa8fe601c1833", "image": "", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/metric-api-limits-restricted-attributes", - "published_at": "2020-10-03T22:32:05Z", - "updated_at": "2020-10-03T22:32:04Z", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/update-serverless-monitoring-aws-lambda", + "published_at": "2020-10-03T16:24:33Z", + "updated_at": "2020-09-24T13:54:59Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "Rate limits and restricted keywords for the New Relic Metric API, and what to do if you reach their limits.", - "body": "This document describes data requirements for the Metric API, including: Data specifications and maximum limits Restricted attributes For instructions on sending metric data and formatting of the JSON payload, see Report metrics via the Metric API. Endpoint requirements and maximum limits All metric data is sent using a POST to: https://metric-api.newrelic.com/metric/v1 If your account hosts data in New Relic's European Union data center, ensure you're using the proper API endpoints for EU region accounts. The following default limits apply for all metric data: Condition Limit Age range for timestamp values Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. Max data points per minute (DPM) See Additional account conditions. 1 million DPM Max unique timeseries (cardinality) per account per day See Additional account conditions. 1 million A timeseries is a single, unique combination of a metric name and any attributes. Max unique timeseries (cardinality) per metric name per day 100k Max payloads per minute 100k Max attributes per metric 100 Max metric attribute name length 255 characters Max characters for an attribute key 255 characters Max metric attribute value length 4096 characters Allowed HTTP protocols HTTPS only Numerical long values falling outside minimum or maximum Java long values Numerical long values that fall outside of the minimum or maximum Java long value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Numerical double values falling outside minimum or maximum Java double values Numeric double values that fall outside of a the minimum or maximum Java double value will be rejected. If the number is in the common block, then the entire block will be dropped. If the number is in a metric data point, then the metric data point it resides in will be dropped. Payload size Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. Payload format The payload must encoded as UTF-8. Attribute naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Additional account conditions: Metric API limits apply at the individual account level. Trial and paid accounts receive a 1M DPM and 1M cardinality limit for trial purposes, but you can request up to 15M DPM and 15M cardinality for your account. To request changes to your metric rate limits, contact your New Relic account representative, or visit our Support portal. Rate limit violations This section describes how the Metric API behaves when you exceed the rate limits, and how to respond if limits are exceeded. Max data points per minute (DPM) Data points per minute refers to the per minute rate at which individual metric values are sent to the Metric API. When the maximum DPM limit is exceeded for an account, the New Relic Metric API returns a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. To resolve this issue, either reduce the number of data points you are sending, or request a rate limit change. Subsequent subscription changes do not impact modified rate limits. If an account change impacts your rate limit, you must notify us to adjust your rate limit. To request rate limit changes, contact your New Relic account representative, or visit our Support portal. Max unique timeseries per account per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-account, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max unique timeseries per metric name per day A timeseries is a single, unique combination of a metric name and any attributes assigned to that metric. For example, if a CPU utilization metric with a single attribute hostname is sent from ten different hosts, this equals ten distinct values for the hostname attribute and ten unique metric timeseries. If the per-metric name, per-day unique metric timeseries (cardinality) limit is exceeded during a 24 hour period, the endpoint will continue to receive and store raw metric data. However, New Relic will stop creating additional aggregate rollups (1 minute, 5 minutes, etc.) for the remainder of the 24 hour period. (These rollups are used used by default to query time windows longer than 60 minutes.) You can continue to query your data when such a violation occurs by specifying a 60 minute or shorter time window or specifying the RAW keyword as described in view and query your metrics. This can be helpful in identifying potential causes for the violation. Max payloads per minute If you make more than 100k POST requests to the Metric API endpoint within a minute, the endpoint will return a 429 response for the remainder of the minute. The response will include a Retry-After header indicating how long to wait in seconds before resubmitting or sending new data. In general, if you reach this limit, consider creating larger payloads. To do this, combine more data points into each request to reduce the number of POSTs that are necessary. If this is not an option, you can request a rate limit increase by contacting your New Relic account representative or visiting our Support portal. Restricted attributes These attributes are restricted by the New Relic platform. Any values submitted with these keys in the attributes section of a metric data point will cause the data point to be dropped, or the value to be omitted or overwritten: Attribute Description newrelic.source This resets to the value metricAPI. metricName This resets to the name value passed into each data point. This allows name to be an attribute key. endTimestamp timestamp and interval.ms will be converted to an endTimestamp for the data point. Additional restrictions include: Restriction Comments Metric and attribute names You cannot pass the same value for metric name and attribute name. In the following example, the metric is invalid because the metric is named service.errors.all and there is an attribute service.errors.all. Example: Metric value used as an attribute (invalid) [ { \"metrics\": [ { \"name\": \"service.errors.all\" , \"type\": \"count\", \"value\": 15, \"timestamp\": 1531414060739, \"interval.ms\": 10000, \"attributes\": { \"service.response.statuscode\": \"400\", \"service.errors.all\" : \"test\", \"service.name\": \"foo\" } } ] } ] Reserved words The Metric API inherits some reserved words from New Relic Insights, including accountID, appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value, common, min, max, count, sum, and metrics. Exception: You can use name as an attribute key. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "How to update our Serverless monitoring for AWS Lambda. ", + "body": "After enabling our monitoring for AWS Lambda, you should occasionally update our Lambda function that's used to report AWS log data: newrelic-log-ingestion. There are two ways to do this: Update via CLI: Use this if you enabled our Lambda monitoring using our CLI tool. Update via AWS Serverless Application Repository: Use this if you enabled using the manual procedure. These update procedures apply to our serverless monitoring for AWS Lambda, and not to our infrastructure monitoring for AWS Lambda integration. Update our Lambda integration via CLI This section describes how to update if your Lambda monitoring was enabled using our recommended CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region identifier (for example, us-west-2). newrelic-lambda integrations update \\ --aws-region YOUR_REGION If you do not have our logs enabled, you'll also need to update your AWS CloudWatch log subscription filters with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --aws-region YOUR_REGION Update Layers via CLI This section describes how to update your function's Layer if you installed it with our CLI tool. Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli Pass the --upgrade flag to the install command: newrelic-lambda layers install \\ --function installed \\ --nr-account-id NR_ACCOUNT_ID \\ --upgrade Update a manual Serverless Application Repository install If you manually installed the ingest function from the AWS Serverless Application Repository (and didn't use the CLI), update using this procedure: Run the following, replacing YOUR_REGION with your region (for example, us-west-2)​. aws serverlessrepo create-cloud-formation-change-set \\ --application-id arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion \\ --stack-name NewRelic-log-ingestion \\ --capabilities CAPABILITY_RESOURCE_POLICY \\ --region YOUR_REGION This command outputs several fields, one of which is the ChangeSetId: an ARN for the change set that you just created. Copy that ARN. Use the ARN in this command, which executes the change set: aws cloudformation execute-change-set --change-set-name YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following command, replacing YOUR_REGION with your region (for example, us-west-2). newrelic-lambda integrations update \\ --enable-logs \\ --aws-region YOUR_REGION Then update your AWS CloudWatch log subscription filters for each region with the following command: newrelic-lambda subscriptions install \\ --function installed \\ --filter-pattern \"\" \\ --aws-region YOUR_REGION For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 92.43757, + "_score": 126.34271, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Ingest and manage data", - "category_0": "Telemetry Data Platform", - "category_1": "Ingest and manage data", - "body": ", appId, and eventType. Additionally, the syntax terms for NRQL are restricted unless you backtick (``) them. For a full list, see Reserved words: NRQL syntax terms. Keys within metric JSON All keys used within the metric JSON cannot be attribute keys. This includes interval.ms, timestamp, value", - "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Ingest APIs" + "sections": "Update our Lambda integration via CLI", + "body": " YOUR_CHANGE_SET_ARN Enabling log management If you currently don't have New Relic's log management enabled, but would like to: Make sure you have the latest version of the CLI: pip install --upgrade newrelic-lambda-cli For each region in which you've installed the newrelic-log-ingestion function, run the following" }, - "id": "5f24e4ede7b9d28743c8231c" + "id": "5f6ca534196a67b08750423e" }, { - "category_2": "NRQL query tutorials", - "nodeid": 36916, + "image": "", + "url": "https://developer.newrelic.com/explore-docs/nr1-common/", "sections": [ - "NRQL: New Relic Query Language", - "Get started", - "NRQL query tools", - "NRQL query tutorials", - "Query APM metric timeslice data with NRQL", - "Why query metric timeslice data?", - "Where to query?", - "How to construct a query", - "How metric timeslice data is converted", - "Attributes", - "Generic queries with the newrelic.timeslice.value metric", - "When to use newrelic.timeslice.value?", - "Get available metrics", - "Facet on a wildcarded metric name segment", - "Recommended aggregator functions", - "Query examples", - "For more help" + "New Relic One CLI common commands", + "Command details", + "nr1 help", + "See commands and get details", + "Usage", + "Arguments", + "Examples", + "nr1 update", + "Update your CLI", + "nr1 create", + "Create a new component", + "Options", + "nr1 profiles", + "Manage your profiles keychain", + "Commands", + "nr1 autocomplete", + "See autocomplete installation instructions", + "nr1 nrql", + "Query using NRQL" ], - "title": "Query APM metric timeslice data with NRQL", - "category_0": "Query your data", - "type": "docs", - "category_1": "NRQL: New Relic Query Language", - "external_id": "f536406572d7d2aafd2df6acd5da36a035ef82c3", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-one-nrql-query-metric-timeslice-data.png", - "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/nrql-query-tutorials/query-apm-metric-timeslice-data-nrql", - "published_at": "2020-10-03T23:04:50Z", - "updated_at": "2020-09-30T16:27:58Z", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials", + "published_at": "2020-10-06T02:14:19Z", + "title": "New Relic One CLI common commands", + "updated_at": "2020-08-14T01:48:10Z", + "type": "developer", + "external_id": "503e515e1095418f8d19329517344ab209d143a4", "document_type": "page", "popularity": 1, - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "body": "APM reports metric data in the form of metric timeslice data, and you can use NRQL to query and facet this type of data. To explore timeslice data in the data explorer, see Explore your metrics. Why query metric timeslice data? We report metrics in several ways. One variety of metric data we call metric timeslice data; this is the type of data used to generate many of the charts in APM, Mobile, and Browser (for more details, see metric timeslice data). Historically, this type of data couldn't be queried via our query language, NRQL. But now we are converting popular APM metrics from metric timeslice data to more-detailed dimensional metric data, which opens them up for querying via NRQL and via our NerdGraph API. This capability allows you to create powerful, in-depth custom visualizations of these important APM metrics. And this includes being able to query your custom metrics. Where to query? We recommend querying APM metric timeslice data using New Relic One query builder in advanced mode. This experience offers full NRQL functionality, and also gives helpful auto-complete suggestions and feedback on query errors. You can also incorporate NRQL queries in our NerdGraph (GraphQL) API. How to construct a query In APM, some charts have the option to view the NRQL query that generated that chart. This can be a good option for understanding how to query metrics. The NRQL query examined below is slightly modified from the error rate chart on the APM summary page. FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) WHERE (entity.guid = 'AN_ENTITY_GUID') AND (transactionType = 'Web') SINCE 1 day ago TIMESERIES Here is a breakdown of how the parts of this query work: Query segment What does it do? FROM Metric Metric is one of our core data types, and metric timeslice data is stored as this data type. For general tips on querying Metric data, see Metric query examples. SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) This math generates a count of errors out of a total count of transaction metrics. This query uses the converted metric names. Note that you can use other aggregator functions. WHERE (entity.guid = 'AN_ENTITY_GUID') You must specify at least one data source. You can select a single entity's GUID, as shown here, or you can select multiple sources. This query uses entity.guid, but you can also use appId or appName. AND (transactionType = 'Web') Sets the transaction type to web, meaning that background/non-web transactions won't be counted. SINCE 1 day ago Selecting a time range. TIMESERIES This optional clause displays the results in a time-based chart. For general information on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't complete. If you don't see a metric you're looking for in this section, see Generic queries. Here are how the original APM metric timeslice metrics are converted into dimensional metrics: Metric timeslice structure Dimensional metric structure APM metric names are represented as single strings of segments separated by forward slashes. For example, the “Datastore/statement/MySQL/users/select” metric represents the time spent in a select database operation on the users table. A single dimensional metric named apm.service.datastore.operation.duration represents the entire group of datastore metrics. This metric has three attributes representing the data values encoded into the metric name, datastoreType, table and operation: datastoreType = ‘MySQL’ table = ‘users’ operation = ‘select’ Some of the APM metrics made available as dimensional metrics: Metric name Description Attributes apm.service.cpu.usertime.utilization Time spent in user-mode code percentage apm.service.datastore.operation.duration Response time for database calls broken out by table operations datastoreType, table, operation apm.service.error.count Summary error count metrics transactionType apm.service.external.host.duration Response time for external calls broken out by external host name external.host apm.service.instance.count Count of the number of agent instances apm.service.memory.physical Process memory in MB apm.service.transaction.apdex Apdex scores per transaction transactionName, transactionType apm.service.transaction.duration Response time per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.error.count Error counts per transaction keyTransactionName, transactionName, transactionType apm.service.transaction.external.duration External call response time by transaction type transactionType Learn how to see all metrics available to you. To understand more about the general structure of metric timeslice data, including some common examples, see Metric timeslice data. Attributes These attributes are available in addition to the metric-specific attributes listed in the APM metrics table above. Name Description appName The name of the application. appId The ID of the application. entity.guid The GUID of the application. host The host of the monitored process. host.bootId The ID of the boot of the host, if available. host.displayName The display_name of the host, if it was set in the agent. instanceName For Java APM agents, host : port metricName The name of the dimensional metric. metricTimesliceName The timeslice name of the legacy metric. Generic queries with the newrelic.timeslice.value metric For metrics that haven't been converted to dimensional metrics, or for your own custom metrics, we have a dimensional metric named newrelic.timeslice.value. We recommend using the dimensional metrics from the table above when possible. When to use newrelic.timeslice.value? Given a metric timeslice name, you can query to see if it has a converted dimensional metric equivalent with this syntax: FROM Metric SELECT uniques(metricName) WHERE metricTimesliceName = 'Datastore/statement/MySQL/test/select' If the only metric name returned is newrelic.timeslice.value, you'll need to query your data using this general approach. Get available metrics To get a list of available metrics for an application, you can use a query like: SELECT uniques(metricTimesliceName) FROM Metric WHERE appName='YOUR_APP_NAME' AND newrelic.timeslice.value IS NOT NULL Facet on a wildcarded metric name segment Some metric timeslice names include attribute values as segments of the metric name. For example, our APM agents report metrics by tracking the duration of external calls using this format: External/{externalHost}/all Here, {externalHost} represents the host name for the outbound network call. Here's an example of a generic newrelic.timeslice.value query of a custom metric that facets on a wildcarded metric segment: FROM Metric SELECT count(newrelic.timeslice.value) WHERE appName = 'MY APP' WITH METRIC_FORMAT 'Custom/Labels/{action}' TIMESERIES FACET action In this query, {action} creates a temporary attribute, action, which is then used by FACET action. You can use any name you want, because it's only an attribute that exists for the duration of the query. You should choose a name that does not conflict with an existing attribute name. Here's another example of a faceted wildcard query: This shows a NRQL query of metric timeslice data that facets the rate of Flask functions by the wildcarded process name. Recommended aggregator functions Recommended NRQL aggregator functions include: apdex average sum count rate uniques Query examples Some examples of querying metric timeslice data: Facet by multiple app names This query uses WHERE… IN to specify two applications and then facet by them: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'Web throughput' WHERE appName IN ('MY_APPLICATION', 'MY_OTHER_APPLICATION') AND (transactionType = 'Web') FACET appName TIMESERIES Throughput-per-minute rate This query displays requests-per-minute chart using the rate function: FROM Metric SELECT rate(count(apm.service.transaction.duration), 1 minute) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago Facet by host-related attributes This query displays a requests-per-minute chart faceted by host name: FROM Metric SELECT count(apm.service.transaction.duration) as 'HttpDispatcher requests_per_minute' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 hours ago FACET host LIMIT 20 Instead of using host, you can facet by other host-related attributes, like host.bootId. Query of average duration of a metric This queries the average duration for a metric using average: FROM Metric SELECT average(apm.service.transaction.duration) as 'HttpDispatcher average duration' WHERE appName = 'MY_APPLICATION' AND (transactionType = 'Web') TIMESERIES SINCE 3 days ago For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 85.00867, + "_score": 118.41706, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "Query APM metric timeslice data with NRQL", - "sections": "Query APM metric timeslice data with NRQL", - "info": "In New Relic, you can query metric timeslice data from APM using NRQL. ", - "category_0": "Query your data", - "category_1": "NRQL: New Relic Query Language", - "category_2": "NRQL query tutorials", - "body": " on NRQL syntax, including FROM, FACET, and TIMESERIES, see Intro to NRQL. For more queries, see Query examples. How metric timeslice data is converted The conversion of original APM metric timeslice metrics into dimensional metrics that are available for querying is an ongoing process and isn't", - "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / NRQL query tutorials" + "title": "New Relic One CLI common commands", + "sections": "New Relic One CLI common commands", + "info": "An overview of common commands you can use with the New Relic One CLI.", + "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1" }, - "id": "5f2b1349196a67379343fbcf" + "id": "5f28bd6ae7b9d267996ade94" } ], "/explore-docs/nr1-plugins": [ @@ -6698,7 +6659,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -6706,7 +6667,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 230.03949, + "_score": 227.0228, "_version": null, "_explanation": null, "sort": null, @@ -6719,6 +6680,40 @@ }, "id": "5efa989e28ccbc535a307dd0" }, + { + "sections": [ + "New Relic CLI Reference", + "New Relic CLI commands", + "Options", + "Commands" + ], + "title": "New Relic CLI Reference", + "type": "developer", + "tags": "new relic cli", + "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", + "image": "", + "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", + "published_at": "2020-10-06T02:13:01Z", + "updated_at": "2020-08-14T01:47:12Z", + "document_type": "page", + "popularity": 1, + "info": "The command line tools for performing tasks against New Relic APIs", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 130.16217, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "New Relic CLI Reference", + "sections": "New Relic CLI commands", + "info": "The command line tools for performing tasks against New Relic APIs", + "tags": "new relic cli", + "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + }, + "id": "5efa989ee7b9d2024b7bab97" + }, { "nodeid": 27692, "sections": [ @@ -6744,65 +6739,31 @@ ], "title": "Enable serverless monitoring for AWS Lambda", "category_0": "Serverless function monitoring", - "type": "docs", - "category_1": "AWS Lambda monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "published_at": "2020-10-04T01:13:08Z", - "updated_at": "2020-10-04T01:13:08Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", - "document_type": "page", - "popularity": 1, - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 133.74316, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "sections": "Step 1. Install the newrelic-lambda-cli tool", - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" - }, - "id": "5f6c67a464441f3a75eb72d3" - }, - { - "sections": [ - "New Relic CLI Reference", - "New Relic CLI commands", - "Options", - "Commands" - ], - "title": "New Relic CLI Reference", - "type": "developer", - "tags": "new relic cli", - "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888", - "image": "", - "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/", - "published_at": "2020-10-05T01:56:43Z", - "updated_at": "2020-08-14T01:47:12Z", + "type": "docs", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "The command line tools for performing tasks against New Relic APIs", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 130.6808, + "_score": 125.96347, "_version": null, "_explanation": null, "sort": null, "highlight": { - "title": "New Relic CLI Reference", - "sections": "New Relic CLI commands", - "info": "The command line tools for performing tasks against New Relic APIs", - "tags": "new relic cli", - "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs" + "sections": "Step 1. Install the newrelic-lambda-cli tool", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": " and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring" }, - "id": "5efa989ee7b9d2024b7bab97" + "id": "5f6c67a464441f3a75eb72d3" }, { "image": "", @@ -6828,7 +6789,7 @@ "nr1 nrql", "Query using NRQL" ], - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:14:19Z", "title": "New Relic One CLI common commands", "updated_at": "2020-08-14T01:48:10Z", "type": "developer", @@ -6839,7 +6800,7 @@ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 119.493225, + "_score": 118.52101, "_version": null, "_explanation": null, "sort": null, @@ -6853,47 +6814,41 @@ }, { "sections": [ - "Quickly tag a set of resources", + "Set up your development environment", "Before you begin", - "Install the New Relic CLI", - "Linux", - "macOS", - "Windows", - "Create your New Relic CLI profile", - "Search for an entity", - "Add tags and tag lists to your entity", - "Note", - "Check that the tags are there", + "A note on support", "Tip", - "Next steps" + "Prepare to build or modify apps", + "Start building", + "Contribute to developer.newrelic.com" ], - "title": "Quickly tag a set of resources", + "title": "Set up your development environment", "type": "developer", "tags": [ - "tags", - "new relic CLI" + "developer account", + "API key", + "New Relic One CLI" ], - "external_id": "c7c374812f8295e409a9b06d552de51ceefc666b", + "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", - "url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/", - "published_at": "2020-10-05T01:55:28Z", - "updated_at": "2020-08-14T01:45:08Z", + "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", + "published_at": "2020-10-06T02:08:36Z", + "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, - "info": "Add tags to applications you instrument for easier filtering and organization.", - "body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", + "info": "Prepare to build apps and contribute to this site", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 105.513145, + "_score": 106.91165, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "Install the New Relic CLI", - "tags": "new relic CLI", - "body": " by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example" + "tags": "New Relic One CLI", + "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app" }, - "id": "5efa999d64441fa74a5f7e2d" + "id": "5efa9973e7b9d242237bab39" } ], "/build-apps/map-pageviews-by-region": [ @@ -6916,18 +6871,18 @@ "New Relic developer champions", "New Relic Podcasts" ], - "published_at": "2020-10-05T01:45:14Z", + "published_at": "2020-10-06T01:57:17Z", "title": "New Relic Developers", - "updated_at": "2020-10-05T01:41:49Z", + "updated_at": "2020-10-06T01:49:17Z", "type": "developer", "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab", "document_type": "page", "popularity": 1, - "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 8 Days : 14 Hours : 51 Minutes : 22 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", + "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 7 Days : 14 Hours : 50 Minutes : 46 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application   Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen", "info": "", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 161.62622, + "_score": 160.29231, "_version": null, "_explanation": null, "sort": null, @@ -6957,7 +6912,7 @@ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a", "image": "", "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/", - "published_at": "2020-10-05T01:55:27Z", + "published_at": "2020-10-06T02:08:36Z", "updated_at": "2020-08-26T01:47:20Z", "document_type": "page", "popularity": 1, @@ -6965,7 +6920,7 @@ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 110.813416, + "_score": 109.814575, "_version": null, "_explanation": null, "sort": null, @@ -6977,53 +6932,53 @@ "id": "5efa9973e7b9d242237bab39" }, { - "nodeid": 27692, + "category_2": "Additional standard features", + "nodeid": 1921, "sections": [ - "AWS Lambda monitoring", - "Get started", - "Enable Lambda monitoring", - "UI and data", + "Browser monitoring", + "Getting started", + "Guides", + "Installation", + "Configuration", + "Browser agent and SPA API", + "Page load timing resources", + "Browser Pro features", + "Additional standard features", + "Performance quality", "Troubleshooting", - "Enable serverless monitoring for AWS Lambda", - "How Lambda monitoring works", - "Enable procedure overview", - "Step 1. Install the newrelic-lambda-cli tool", - "CLI requirements", - "CLI installation", - "Step 2. Connect AWS to New Relic", - "Use CLI tool", - "Manual procedures", - "Step 3. Enable Lambda instrumentation", - "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", - "What's next?", - "Optional: Stream all logs to New Relic", + "Browser Geography: Webpage performance by location", + "Contents", + "View performance data by region", + "Use page functions", + "View drill-down details", "For more help" ], - "title": "Enable serverless monitoring for AWS Lambda", - "category_0": "Serverless function monitoring", + "title": "Browser Geography: Webpage performance by location", + "category_0": "Browser monitoring", "type": "docs", - "category_1": "AWS Lambda monitoring", - "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", - "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", - "published_at": "2020-10-04T01:13:08Z", - "updated_at": "2020-10-04T01:13:08Z", - "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", + "category_1": "Browser monitoring", + "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", + "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", + "published_at": "2020-10-03T23:25:25Z", + "updated_at": "2020-08-15T09:25:45Z", + "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", "document_type": "page", "popularity": 1, - "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", - "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 94.81943, + "_score": 89.145615, "_version": null, "_explanation": null, "sort": null, "highlight": { - "body": " invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent("MyEvent", map[string]interface{}{ "zip": "zap", }) } fmt.Println("hello world!") } Build and zip your Lambda function" + "sections": "View performance data by region", + "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", + "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" }, - "id": "5f6c67a464441f3a75eb72d3" + "id": "561c8bbc827a6617ad000172" }, { "sections": [ @@ -7045,7 +7000,7 @@ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdstorage/", - "published_at": "2020-10-05T01:56:44Z", + "published_at": "2020-10-06T02:13:00Z", "updated_at": "2020-09-08T01:50:19Z", "document_type": "page", "popularity": 1, @@ -7053,7 +7008,7 @@ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 90.184296, + "_score": 89.07765, "_version": null, "_explanation": null, "sort": null, @@ -7065,53 +7020,53 @@ "id": "5efa989ee7b9d2048e7bab92" }, { - "category_2": "Additional standard features", - "nodeid": 1921, + "nodeid": 27692, "sections": [ - "Browser monitoring", - "Getting started", - "Guides", - "Installation", - "Configuration", - "Browser agent and SPA API", - "Page load timing resources", - "Browser Pro features", - "Additional standard features", - "Performance quality", + "AWS Lambda monitoring", + "Get started", + "Enable Lambda monitoring", + "UI and data", "Troubleshooting", - "Browser Geography: Webpage performance by location", - "Contents", - "View performance data by region", - "Use page functions", - "View drill-down details", + "Enable serverless monitoring for AWS Lambda", + "How Lambda monitoring works", + "Enable procedure overview", + "Step 1. Install the newrelic-lambda-cli tool", + "CLI requirements", + "CLI installation", + "Step 2. Connect AWS to New Relic", + "Use CLI tool", + "Manual procedures", + "Step 3. Enable Lambda instrumentation", + "Step 4. Configure CloudWatch logs to stream to New Relic Lambda", + "What's next?", + "Optional: Stream all logs to New Relic", "For more help" ], - "title": "Browser Geography: Webpage performance by location", - "category_0": "Browser monitoring", + "title": "Enable serverless monitoring for AWS Lambda", + "category_0": "Serverless function monitoring", "type": "docs", - "category_1": "Browser monitoring", - "external_id": "ccbfe8376f2aee5d35b31dbcee84ff1cbff5b094", - "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/geo_overview.png", - "url": "https://docs.newrelic.com/docs/browser/new-relic-browser/additional-standard-features/browser-geography-webpage-performance-location", - "published_at": "2020-10-03T23:25:25Z", - "updated_at": "2020-08-15T09:25:45Z", - "breadcrumb": "Contents / Browser monitoring / Browser monitoring / Additional standard features", + "category_1": "AWS Lambda monitoring", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "external_id": "7992b896d4c35ca29aba34698aedd621dfe0b572", + "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/new-relic-lambda-monitoring-architecture.png", + "url": "https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda", + "published_at": "2020-10-04T01:13:08Z", + "updated_at": "2020-10-04T01:13:08Z", + "breadcrumb": "Contents / Serverless function monitoring / AWS Lambda monitoring / Enable Lambda monitoring", "document_type": "page", "popularity": 1, - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": "Browser monitoring's Geography page provides a world view with color-coded Apdex scores and other performance information about your end users' experience. You can select specific geographic regions, such as countries or states, and then you can drill down to detailed information about page load performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world view and drill-down details of color-coded performance information for geographic locations. Go to one.newrelic.com > Browser > (select an app) > Geo > Global (for a world view). OR Go to one.newrelic.com > Browser > (select an app) > Geo > (select a location) (for a specific location you identified in the Browser application settings). To drill down to a specific area, select a location from the list, or select any area on the geographical map. To view additional details about the selected location, select the Page load performance or Historical performance links. To return to the main Geography page, select X (Close). one.newrelic.com > Browser > (select an app) > Geo > (select a location): If you selected specific locations from Settings > Application settings, the Geography page includes tabs to view their performance data directly. Use page functions Use any of our standard user interface functions and page functions to drill down into detailed information. Here is a summary of additional options with the Geography page: If you want to... Do this... Change how the performance data appears Select your choice from the Sort by menu. Adjust the amount of information that appears Select or clear the Hide <% throughput checkbox (<1% for global view, <2% for selected locations). View a map of a specific location Do any of these as applicable: Select the location's name from the Geo > Global list. Select its physical location on the map. If you have pre-selected the location from Application settings, select its tab. View summary performance information about a specific location Mouse over any colored area. View drill-down details After you select a specific location, the Page load performance page shows: Average page load time in seconds Number of page views and active sessions as pages per minute (ppm) Recent browser traces if applicable one.newrelic.com > Browser > (select an app) > Geo > (select a location): After you select a specific location, you can view specific details about Page load performance and Historical performance. In addition, the Historical performance page shows comparison data for the selected time period, yesterday, and last week for the selected location. This includes: Response time Apdex Throughput in pages per minute (ppm) For more help Additional documentation resources include the Page views page (details about end users' overall experience with your site). If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "info": "Read about how to install and enable New Relic monitoring for Amazon AWS Lambda. ", + "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 89.92387, + "_score": 88.058716, "_version": null, "_explanation": null, "sort": null, "highlight": { - "sections": "View performance data by region", - "info": "Browser's Geography feature shows color-coded Apdex scores and page load performance for your end users' experience around the world.", - "body": " performance and historical performance. Contents View performance data by region Firewalls may have an impact on the geographical data collected about your end users. To view or sort the performance information by location: one.newrelic.com > Browser > (select an app) > Geo: This page provides a world" + "body": " invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent("MyEvent", map[string]interface{}{ "zip": "zap", }) } fmt.Println("hello world!") } Build and zip your Lambda function" }, - "id": "561c8bbc827a6617ad000172" + "id": "5f6c67a464441f3a75eb72d3" } ], "/build-apps/set-up-dev-env": [ @@ -7137,7 +7092,7 @@ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b", "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png", "url": "https://developer.newrelic.com/explore-docs/nr1-cli/", - "published_at": "2020-10-05T01:58:07Z", + "published_at": "2020-10-06T02:13:01Z", "updated_at": "2020-09-17T01:51:10Z", "document_type": "page", "popularity": 1, @@ -7145,7 +7100,7 @@ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 235.12762, + "_score": 229.41441, "_version": null, "_explanation": null, "sort": null, @@ -7158,6 +7113,66 @@ }, "id": "5efa989e28ccbc535a307dd0" }, + { + "nodeid": 6276, + "sections": [ + "New Relic Alerts", + "Get started", + "Alert policies", + "Alert conditions", + "Alert violations", + "Alert Incidents", + "Alert notifications", + "Troubleshooting", + "Rules, limits, and glossary", + "Alerts and Nerdgraph", + "REST API alerts", + "REST API calls for alerts", + "Available data and functions via API", + "Conditions excluded from the REST API", + "Using a Personal API key with the REST API", + "Notification channels", + "Conditions for APM, Browser, Mobile", + "Conditions for NRQL", + "Conditions for external services", + "Conditions for Synthetic monitoring", + "Conditions for plugins", + "Alert activity: Events, violations, incidents", + "Alert entity conditions", + "For more help" + ], + "title": "REST API calls for alerts", + "category_0": "Alerts and Applied Intelligence", + "type": "docs", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "external_id": "f696d6446d171b8db8c84991bb88c9690b5d3f5b", + "image": "", + "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "published_at": "2020-10-06T02:37:17Z", + "updated_at": "2020-10-06T02:37:17Z", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / REST API alerts", + "document_type": "page", + "popularity": 1, + "info": "Read about how to use the REST API Explorer with alerts.", + "body": "Our REST API (v2) allows you to configure settings for alerts. The API Explorer also includes the curl request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. You can also create alert conditions in the UI. For infrastructure alerting, see REST API for infrastructure monitoring alerts. Available data and functions via API REST API functions Comments View account data In general, any role can use the account's REST API key or a Personal API key with GET > List functions to view alerts data. The account Owner and Admins may use their API key. List output will be paginated. Available functions include: Alert policies Notification channels Conditions for APM, Browser, and Mobile (Some limitations apply.) Conditions for external services Conditions for Synthetic monitoring Conditions for Plugins Conditions for NRQL (Some limitations apply.) Events Violations Incidents Maintain account data You may have an Owner or Admin role in your account and an Admin user's API key or have a custom role that grants permissions to manage Alerts and a Personal API key in order to use any maintenance function, including POST > Create, PUT > Add, PUT > Update, and DELETE. Conditions excluded from the REST API These types of conditions do not have available endpoints in the API: APM: Web transaction percentiles, conditions targeting labels, and baselines NRQL: Baselines Using a Personal API key with the REST API To use a Personal API key in any of the examples below, replace 'X-Api-Key:{api_key}' with 'Api-Key:{personal_api_key}'. Alert policies These API functions include links to the API Explorer, where you can create, delete, or list policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create new policies To add new policies, use your Admin user's API key or Personal API key, and include these two values in the API call: Required values Definition Incident incident_preference Determines how Alerts will create incidents and group violations. This must be one of the following: PER_POLICY (default): Roll up by policy. PER_CONDITION: Roll up by condition. PER_CONDITION_AND_TARGET: Roll up by target and condition. Policy name The policy name is required. Leaving it unchanged will create a policy called string. API Explorer: Alerts Policies > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_policies.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"policy\": { \"incident_preference\": \"string\", \"name\": \"string\" } }' Update policies Use this API to update an existing policy's name and incident_preference. You'll need your Admin user's API key or Personal API key. Required values Definition id Required. To find a policy's ID, use either of these options: From the UI: On a policy's UI page, find the ID under the policy name. With the API: Use the List policies API. Incident incident_preference Determines how alerts will create incidents and group violations. Must be one of the following: PER_POLICY (default): Roll up by policy. PER_CONDITION: Roll up by condition. PER_CONDITION_AND_TARGET: Roll up by target and condition. Policy name Required. If you do not change the name, it defaults to a policy called string. To find a policy's exact name, use the List policies API. API Explorer: Alerts Policies > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_policies/{id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"policy\": { \"incident_preference\": \"string\", \"name\": \"string\" } }' Delete existing policies To delete an existing policy, use your Admin user's API key or Personal API key, and include the policy_id (available from API Explorer: Alerts Policies > GET > List) in the API call: API Explorer: Alerts Policies > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing policies To view a list of existing policies for your account, use your API key or Personal API key, and include these optional values in the API call: Optional policy name filter Optional pagination value API Explorer: Alerts Policies > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_policies.json' \\ -H 'X-Api-Key:{api_key}' -i Notification channels These API functions include links to the API Explorer, where you can create, delete, or list Alerts notification channels. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create new notification channels To add new notification channels, use your Admin user's API key or Personal API keyand include these values in the API call: New channel's name Type of channel Configuration values The API Explorer shows the format for required configuration values for each type of notification channel. API Explorer: Alerts Channels > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"channel\": { \"name\": \"string\", \"type\": \"string\", \"configuration\": \"hash\" } }' The \"hash\" place holder in this example must be replaced by one of the following JSON blocks with the appropriate values substituted: Email channel { \"recipients\" : \"test@google.com\", \"include_json_attachment\" : true } OpsGenie channel { \"api_key\": \"abc123\", \"teams\": \"team1\", \"tags\": \"tag1\", \"recipients\": \"me@me.com\" } Slack channel { \"url\": \"http://test.com\", \"channel\": \"channel1\" } VictorOps channel { \"key\": \"mykey\", \"route_key\": \"theroute\" } PagerDuty channel { \"service_key\": \"myservicekey\" } Webhook (json) channel This example shows the default payload inserted. (The payload attribute is optional.) The payload can be customized to have different keys than the ones shown and will be sent with the $ prefixed attributes interpolated prior to delivery. The condition_id is deprecated. Instead, use condition_family_id. { \"base_url\": \"http://test.com\", \"auth_username\": \"username\", \"auth_password\": \"password\", \"payload_type\": \"application/json\", \"headers\": { \"header1\": \"test\", \"header2\": \"test\" } \"payload\": { \"account_id\": \"$ACCOUNT_ID\", \"account_name\": \"$ACCOUNT_NAME\", \"closed_violations_count_critical\": \"$CLOSED_VIOLATIONS_COUNT_CRITICAL\", \"closed_violations_count_warning\": \"$CLOSED_VIOLATIONS_COUNT_WARNING\", \"condition_family_id\": \"$CONDITION_FAMILY_ID\", \"condition_id\": \"$CONDITION_ID\", \"condition_name\": \"$CONDITION_NAME\", \"current_state\": \"$EVENT_STATE\", \"details\": \"$EVENT_DETAILS\", \"duration\": \"$DURATION\", \"event_type\": \"$EVENT_TYPE\", \"incident_acknowledge_url\": \"$INCIDENT_ACKNOWLEDGE_URL\", \"incident_id\": \"$INCIDENT_ID\", \"incident_url\": \"$INCIDENT_URL\", \"open_violations_count_critical\": \"$OPEN_VIOLATIONS_COUNT_CRITICAL\", \"open_violations_count_warning\": \"$OPEN_VIOLATIONS_COUNT_WARNING\", \"owner\": \"$EVENT_OWNER\", \"policy_name\": \"$POLICY_NAME\", \"policy_url\": \"$POLICY_URL\", \"runbook_url\": \"$RUNBOOK_URL\", \"severity\": \"$SEVERITY\", \"targets\": \"$TARGETS\", \"timestamp\": \"$TIMESTAMP\", \"violation_callback_url\": \"$VIOLATION_CALLBACK_URL\", \"violation_chart_url\": \"$VIOLATION_CHART_URL\" } } Webhook (x-www-form-urlencoded) channel This example shows the default payload inserted. (The payload attribute is optional.) The payload can be customized to have different keys than the ones shown and will be sent with the $ prefixed attributes interpolated prior to delivery. The condition_id is deprecated. Instead, use condition_family_id. { \"base_url\": \"http://test.com\", \"auth_username\": \"username\", \"auth_password\": \"password\", \"payload_type\": \"application/x-www-form-urlencoded\", \"headers\": { \"header1\": \"test\", \"header2\": \"test\" }, \"payload\": { \"account_id\": \"$ACCOUNT_ID\", \"account_name\": \"$ACCOUNT_NAME\", \"closed_violations_count_critical\": \"$CLOSED_VIOLATIONS_COUNT_CRITICAL\", \"closed_violations_count_warning\": \"$CLOSED_VIOLATIONS_COUNT_WARNING\", \"condition_family_id\": \"$CONDITION_FAMILY_ID\", \"condition_id\": \"$CONDITION_ID\", \"condition_name\": \"$CONDITION_NAME\", \"current_state\": \"$EVENT_STATE\", \"details\": \"$EVENT_DETAILS\", \"duration\": \"$DURATION\", \"event_type\": \"$EVENT_TYPE\", \"incident_acknowledge_url\": \"$INCIDENT_ACKNOWLEDGE_URL\", \"incident_id\": \"$INCIDENT_ID\", \"incident_url\": \"$INCIDENT_URL\", \"open_violations_count_critical\": \"$OPEN_VIOLATIONS_COUNT_CRITICAL\", \"open_violations_count_warning\": \"$OPEN_VIOLATIONS_COUNT_WARNING\", \"owner\": \"$EVENT_OWNER\", \"policy_name\": \"$POLICY_NAME\", \"policy_url\": \"$POLICY_URL\", \"runbook_url\": \"$RUNBOOK_URL\", \"severity\": \"$SEVERITY\", \"targets\": \"$TARGETS\", \"timestamp\": \"$TIMESTAMP\", \"violation_callback_url\": \"$VIOLATION_CALLBACK_URL\", \"violation_chart_url\": \"$VIOLATION_CHART_URL\" } } Delete existing notification channels To delete an existing notification channels, use your Admin user's API key or Personal API key, and include the channel_id (available from API Explorer: Alerts Channels > GET > List) in the API call: API Explorer: Alerts Channels > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_channels/{channel_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing notification channels To view a list of existing notification channels for your account, use your REST API key, Admin user's API key, or Personal API key and an optional pagination value in the API call. API Explorer: Alerts Channels > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_channels.json' \\ -H 'X-Api-Key:{api_key}' -i Update notification channels associated with policies You can associate a policy with one or more notification channels. You can also associate a notification channel with one or more policies. To add notification channels to policies, use your Admin user's API key or Personal API key and these values in the API call: A policy_id value (available from API Explorer: Alerts Policies > GET > List) One or more channel_id values in an array, separated by commas or a new line (available from API Explorer: Alerts Channels > GET > List) API Explorer: Alerts Policy Channels > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_policy_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -G -d 'policy_id=policy_id&channel_ids=channel_id' Delete notification channels associated with policies You can associate a policy with one or more notification channels. You can also associate a notification channel with one or more alert policies. To remove a policy from a channel, or to remove a channel from a policy, use your Admin user's API key or Personal API keyand these values in the API call: The policy_id (available from API Explorer: Alerts Policies > GET > List) The channel_id (available from API Explorer: Alerts Channels > GET > List) API Explorer: Alerts Policy Channels > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_policy_channels.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -d 'channel_id={channel_id}&policy_id={policy_id}' Conditions for APM, Browser, Mobile These API functions include links to the API Explorer, where you can create, update, delete, or list policy conditions. These calls are for conditions with these types of entities: APM: Apps and key transactions Browser: Apps and key transactions Mobile: Mobile apps Exception: The following APM conditions are not available from this API endpoint: Conditions targeting labels (dynamic targeting) Web transaction percentile conditions Baseline conditions The API Explorer provides information about other types of conditions using separate endpoints, including external services (APM and Mobile), plugins, and Synthetic monitoring. Consider all types of alert conditions when searching or updating. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create conditions for policies To add conditions to policies, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric\": \"string\", \"gc_metric\": \"string\", \"condition_scope\": \"string\", \"violation_close_timer\": integer, \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"user_defined\": { \"metric\": \"string\", \"value_function\": \"string\" } } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Conditions > GET > List. Update conditions for policies To update conditions for policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: Alerts Conditions > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric\": \"string\", \"metric\": \"string\", \"gc_metric\": \"string\", \"condition_scope\": \"string\", \"violation_close_timer\": integer, \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"user_defined\": { \"metric\": \"string\", \"value_function\": \"string\" } } }' Delete conditions from policies To delete conditions from policies, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts Conditions > GET > List) API Explorer: Alerts Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing conditions for policies To view a list of existing conditions for your policy, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for NRQL These API functions include links to the API Explorer, where you can create, update, delete, or list NRQL conditions for your policies. Exception: NRQL baseline conditions are not available from this endpoint. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create NRQL conditions for policies Recommendation: Due to the way NRQL data is aggregated, set the nrql[since_value] to 3 or higher to prevent false positives. This equates to the Evaluation Offset value in the Alerts Condition UI. API Explorer: Alerts Nrql Conditions > POST > Create To create NRQL conditions for policies: curl -X POST 'https://api.newrelic.com/v2/alerts_nrql_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"nrql_condition\": { \"type\": \"string\", \"name\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean, \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"value_function\": \"string\", \"nrql\": { \"query\": \"string\", \"since_value\": \"string\" } } }' If you set nrql[since_value] to 3 and nrql[query] to SELECT count FROM myEvent, New Relic evaluates the following query against the terms[threshold] value once per minute: SELECT count FROM myEvent SINCE 3 minutes ago UNTIL 2 minutes ago If you set type as outlier, you can omit the value_function. However, two additional fields are required: expected_groups and ignore_overlap. For more information, see Alerts Conditions API field names. If you omit type or set it as static, it will default to standard NRQL alerting. Update NRQL conditions for policies Recommendation: Due to the way NRQL data is aggregated, set the nrql[since_value] to 3 or higher to prevent false positives. This allows three minutes to aggregate data, and equates to the Evaluation Offset value in the Alerts Condition UI. To update NRQL conditions for policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: [external link] Alerts Nrql Conditions > GET > List) The required condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Nrql Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_nrql_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"nrql_condition\": { \"name\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean, \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"value_function\": \"string\", \"nrql\": { \"query\": \"string\", \"since_value\": \"string\" } } }' Delete NRQL conditions for policies To delete NRQL conditions from policies, include these values in the API call: Your Admin user's API key or Personal API key The condition's id (available from API Explorer: [external link] Alerts Nrql Conditions > GET > List) API Explorer: Alerts Nrql Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_nrql_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i List existing NRQL conditions for policies To view a list of existing conditions for your alert policy, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Nrql Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_nrql_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for external services These API functions include links to the API Explorer, where you can create, update, delete, or list policy conditions. These calls are for conditions for external services. The API calls can be used with APM and Mobile apps. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. External services: Create conditions for policies To add conditions for external services to policies that have APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required external_service_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts External Service Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_external_service_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"external_service_condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"external_service_url\": \"string\", \"metric\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ] } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts External Service Conditions > GET > List. External services: Update conditions for policies To update conditions for external services to policies that have APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The external service condition's id (available from API Explorer: Alerts External Service Conditions > GET > List) The required external_service_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts External Service Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_external_service_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"external_service_condition\": { \"type\": \"string\", \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"external_service_url\": \"string\", \"metric\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ] } }' External services: Delete conditions from policies To delete conditions for external services from policies with APM or Mobile apps, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts External Service Conditions > GET > List) API Explorer: Alerts External Service Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_external_service_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i External services: List existing conditions for policies To view a list of existing conditions for policies with external service apps (APM or Mobile), use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts External Service Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_external_service_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Conditions for Synthetic monitoring These API functions include links to the API Explorer, where you can create, update, delete, or list conditions for your alert policies. The API calls can be used with Synthetic monitoring. Synthetics: Create conditions for policies To add conditions to policies for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required synthetics_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Synthetics Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_synthetics_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"synthetics_condition\": { \"name\": \"string\", \"monitor_id\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Synthetics Conditions > GET > List. Synthetic monitoring: Update conditions for policies To update policy conditions for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Synthetics Conditions > GET > List) The required synthetics_condition values in the API call (described in the API Explorer page to create alert conditions for Synthetics and in the Alerts conditions API glossary) API Explorer: Alerts Synthetics Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"synthetics_condition\": { \"name\": \"string\", \"monitor_id\": \"string\", \"runbook_url\": \"string\", \"enabled\": boolean } }' Synthetic monitoring: Delete conditions from policies To delete policy conditions for Synthetic monitoring, include these values in the API call: Your Admin user's API key or Personal API key The condition_id (available from API Explorer: Alerts Synthetics Conditions > GET > List) API Explorer: Alerts Synthetics Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i Synthetic monitoring: List existing conditions for policies To view a list of existing policy conditions for Synthetic monitoring, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Synthetics Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_synthetics_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id=policy_id' Conditions for plugins These API functions include links to the API Explorer, where you can create, update, delete, or list conditions for your alert policies. The API calls can be used with plugins from New Relic's Plugin Central. Plugins: Create conditions for policies To add conditions to policies for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The policy_id (available from API Explorer: Alerts Policies > GET > List) The required plugins_condition values in the API call (described in the API Explorer page and in the Alerts conditions API glossary) API Explorer: Alerts Plugins Conditions > POST > Create curl -X POST 'https://api.newrelic.com/v2/alerts_plugins_conditions/policies/{policy_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"plugins_condition\": { \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric_description\": \"string\", \"metric\": \"string\", \"value_function\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"plugin\": { \"id\": \"string\", \"guid\": \"string\" } } }' The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Plugins Conditions > GET > List. Plugins: Update conditions for policies To update policy conditions for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Plugins Conditions > GET > List) The required plugins_condition values in the API call (described in the API Explorer page to create alert conditions for plugins and in the Alerts conditions API glossary) API Explorer: Alerts Plugins Conditions > PUT > Update curl -X PUT 'https://api.newrelic.com/v2/alerts_plugins_conditions/{id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i \\ -H 'Content-Type: application/json' \\ -d \\ '{ \"plugins_condition\": { \"name\": \"string\", \"enabled\": boolean, \"entities\": [ integer ], \"metric_description\": \"string\", \"metric\": \"string\", \"value_function\": \"string\", \"runbook_url\": \"string\", \"terms\": [ { \"duration\": \"string\", \"operator\": \"string\", \"priority\": \"string\", \"threshold\": \"string\", \"time_function\": \"string\" } ], \"plugin\": { \"id\": \"string\", \"guid\": \"string\" } } }' Plugins: Delete conditions from policies To delete conditions from policies for plugin components or instances, include these values in the API call: Your Admin user's API key or Personal API key The condition id (available from API Explorer: Alerts Plugins Conditions > GET > List) API Explorer: Alerts Plugins Conditions > DELETE > Delete curl -X DELETE 'https://api.newrelic.com/v2/alerts_plugins_conditions/{condition_id}.json' \\ -H 'X-Api-Key:{admin_api_key}' -i Plugins: List existing conditions for policies To view a list of existing conditions for policies with plugin components or instances, use your REST API key, Admin user's API key, or Personal API key and the associated policy_id in the API call. API Explorer: Alerts Plugins Conditions > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_plugins_conditions.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -d 'policy_id={policy_id}' Alert activity: Events, violations, incidents These API functions include links to the API Explorer, where you can view information about events, violations, and incidents for your alert policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. List Events To view events for entities monitored by APM, Browser, Mobile, Plugins, Synthetic monitoring, and Alerts, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key Other optional values to use as filters (described in the API Explorer page) that depend on the type of product (browser monitoring, mobile monitoring, etc.), entity (as apps or key transactions for APM, synthetic monitoring, etc.), and type of event (notification, deployment, instrumentation, etc.) An optional pagination value API Explorer: Alerts Events > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_events.json' \\ -H 'X-Api-Key:{api_key}' -i List Violations To view violations for any entity monitored for your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An optional flag to show only those violations that are currently open An optional pagination value API Explorer: Alerts Violations > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_violations.json' \\ -H 'X-Api-Key:{api_key}' -i To find policy, condition, and incident information: take the IDs found in the links section in the violations property and place them into the URLs contained in the outer links property of the payload. List Incidents To view incidents for any entity monitored for your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An optional flag to show only those incidents that are currently open An optional flag to exclude violation data from response An optional pagination value API Explorer: Alerts Incidents > GET > List curl -X GET 'https://api.newrelic.com/v2/alerts_incidents.json' \\ -H 'X-Api-Key:{api_key}' -i Show Incident To show a single incident associated with your account, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key An incident ID API Explorer: Alerts Incidents > GET > Show curl -X GET 'https://api.newrelic.com/v2/alerts_incidents/{id}.json' \\ -H 'X-Api-Key:{api_key}' -i Acknowledge Incident To acknowledge an incident associated with your account, include these values in the API call: Your Admin user's API key or Personal API key. An incident ID API Explorer: Alerts Incidents > PUT > Acknowledge curl -X PUT 'https://api.newrelic.com/v2/alerts_incidents/{id}/acknowledge.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' Close Incident To close an incident associated with your account, include these values in the API call: Your Admin user's API key or Personal API key. An incident ID API Explorer: Alerts Incidents > PUT > Close curl -X PUT 'https://api.newrelic.com/v2/alerts_incidents/{id}/close.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' Alert entity conditions These API functions include links to the API Explorer, where you can list, add and remove entities in the conditions for your alert policies. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. List condition by entity To view the conditions an entity is part of for APM, Browser, Mobile, key transactions, and Plugins, include these values in the API call: Your REST API key, Admin user's API key, or Personal API key The entity_id This is the specific entity (alert target) to be monitored. The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > GET > list curl -X GET 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -G -d 'entity_type={entity_type}' Add an entity to a condition To add an entity to a condition, include these values in the API call: Your Admin user's API key or Personal API key The entity_id This is the entity (alert target) to be monitored. It is the numeric ID for the APM application, browser app, plugin, key transaction, or mobile app. The condition_id (available from API Explorer: Alerts Conditions > GET > List) The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > PUT > Add curl -X PUT 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -H 'Content-Type: application/json' \\ -G -d 'entity_type={entity_type}&condition_id={condition_id}' Remove an entity from a condition To remove an entity being monitored from a condition, include these values in the API call: Your Admin user's API key or Personal API key The entity_id This is the specific monitored entity (alert target) to be removed. It is the numeric ID for the APM application, browser app, plugin, key transaction, or mobile app. The condition_id (available from API Explorer: Alerts Conditions > GET > List) The entity_type, which must be one of the following: Application BrowserApplication MobileApplication KeyTransaction Plugin API Explorer: Alerts Entity Conditions > DELETE > Remove curl -X DELETE 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \\ -H 'X-Api-Key:{api_key}' -i \\ -G -d 'entity_type={entity_type}&condition_id={condition_id}' For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", + "_index": "520d1d5d14cc8a32e600034b", + "_type": "520d1d5d14cc8a32e600034c", + "_score": 173.20406, + "_version": null, + "_explanation": null, + "sort": null, + "highlight": { + "title": "REST API calls for alerts", + "sections": "New Relic Alerts", + "info": "Read about how to use the REST API Explorer with alerts.", + "category_1": "New Relic Alerts", + "translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/rest-api-alerts/rest-api-calls-alerts", + "body": ", or list Alerts notification channels. If your account hosts data in the EU data center, ensure you are using the proper API endpoints for EU region accounts. Create new notification channels To add new notification channels, use your Admin user's API key or Personal API keyand include these values", + "breadcrumb": "Contents / Alerts and Applied Intelligence / New Relic Alerts / REST API alerts" + }, + "id": "5f344a7c196a677172fbd6e5" + }, { "nodeid": 27692, "sections": [ @@ -7198,7 +7213,7 @@ "body": "Serverless monitoring for AWS Lambda offers in-depth performance monitoring for your Lambda functions. Read on to learn how to enable this feature and get started using it. Using this feature may result in AWS charges. For more information, see the Lambda monitoring requirements.​​​ How Lambda monitoring works Before enabling Lambda monitoring, understanding how data flows from your Lambda functions to New Relic may be helpful: Diagram showing how data flows from a Lambda function to New Relic. When our Lambda monitoring is enabled, this is how data moves from your Lambda function to New Relic: The Lambda function is instrumented with our code. CloudWatch collects Lambda log data and sends it to our log-ingestion Lambda. The log-ingestion Lambda sends that data to New Relic. Enable procedure overview If you already have a New Relic account and use Node.js or Python, we recommend you use our automated installer. If you do not use the automated installer, complete these steps to set up monitoring: Install our CLI tool (recommended) Connect AWS and New Relic (required) Enable instrumentation of your Lambda (required) Stream CloudWatch logs to New Relic (required) Step 1. Install the newrelic-lambda-cli tool We provide a command line interface (CLI) tool that's used in steps 2 through 4. We recommend the CLI because it simplifies some of the work, but you can also perform those steps manually. If you want to understand what it does before you install it, see the manual procedures that the CLI tool performs in Step 2, Step 3 (option 2), and Step 4. You can also see the CLI documentation on GitHub. If you prefer a manual install, skip to Step 2. Connect AWS to New Relic. CLI requirements To use the CLI too, you need: Python 3.3 or higher The AWS CLI You must be a user or admin with an infrastructure manager Add-on role. Your AWS account needs permissions for creating IAM resources (Role and Policy) and Lambda functions. These resources are created using CloudFormation stacks, so you'll need permissions to create those. For more on permissions, including setting custom policies, expand this collapser: AWS permissions details Resource: * Actions: \"cloudformation:CreateChangeSet\", \"cloudformation:CreateStack\", \"cloudformation:DescribeStacks\", \"cloudformation:ExecuteChangeSets\", \"iam:AttachRolePolicy\", \"iam:CreateRole\", \"iam:GetRole\", \"iam:PassRole\", \"lambda:AddPermission\", \"lambda:CreateFunction\", \"lambda:GetFunction\", \"logs:DeleteSubscriptionFilter\", \"logs:DescribeSubscriptionFilters\", \"logs:PutSubscriptionFilter\" \"s3:GetObject\" \"serverlessrepo:CreateCloudFormationChangeSet\" Resource: \"arn:aws:serverlessrepo:us-east-1:463657938898:applications/NewRelic-log-ingestion\" Actions: \"serverlessrepo:CreateCloudFormationTemplate\" \"serverlessrepo:GetCloudFormationTemplate\" Be sure that the AWS account you use to execute the CLI has all of these permissions. If your AWS account permissions are restrictive and you're unable to use the CLI, you can optionally use a manually managed custom IAM policy. This policy would require, at minimum, the following permissions: Resource: \"*\" Action: \"cloudwatch:GetMetricStatistics\" \"cloudwatch:ListMetrics\" \"cloudwatch:GetMetricData\" \"lambda:GetAccountSettings\" \"lambda:ListFunctions\" \"lambda:ListAliases\" \"lambda:ListTags\" \"lambda:ListEventSourceMappings\" These permissions are the minimum required. We recommend granting a managed ReadOnlyAccess policy as described in Connect AWS to infrastructure monitoring. CLI installation To install the CLI tool: Ensure you have the required permissions for both your New Relic and AWS account. From the command line, run: pip install newrelic-lambda-cli You may need to use pip3 in the command above if you have Python 2.7 installed. The CLI requires Python >=3.3. Step 2. Connect AWS to New Relic You must complete this step, and steps 3 and 4, to enable our Lambda monitoring. This step connects AWS to New Relic and creates a newrelic-log-ingestion Lambda function that sends your instrumented data to New Relic. You can either use the CLI tool or do the steps manually. Use CLI tool When you use the CLI, you have one optional step and one required step: Optional: If you're using multiple AWS profiles or multiple regions, you may want to configure the AWS environment variables: AWS environment variable instructions Setting the region To configure your region, use this environment variable to override the default region: export AWS_DEFAULT_REGION=MY_REGION # us-west-2, for example The CLI tool also allows passing this per-command using --aws-region. Setting profiles If you have multiple AWS profiles and don't want to use the default, use AWS_PROFILE environment variable to set another profile name. Ensure the profile is properly configured (including the default region). Example: export AWS_PROFILE=MY_PROFILE Run the following command using the CLI tool: newrelic-lambda integrations install --nr-account-id YOUR_ACCOUNT_ID \\ --linked-account-name YOUR_LINKED_ACCOUNT_NAME \\ --nr-api-key YOUR_NR_API_KEY This command: Connects your AWS account to New Relic. Installs a newrelic-log-ingestion Lambda that will send your instrumented data to New Relic. More details: This defaults to U.S. region. If your account is in the EU region, add this argument: --nr-region \"eu\". If you're instrumenting functions in multiple AWS regions, this command must be run for each region using the --aws-region argument. YOUR_LINKED_ACCOUNT_NAME is either a new AWS account you want to link to New Relic, or it's the name of the AWS account that you linked to when setting up the AWS Lambda monitoring integration. YOUR_NR_API_KEY refers to your personal API key (not your REST API key). For more on the API key and other arguments, see our Lambda monitoring GitHub repo. Manual procedures Here are the manual procedures performed by the CLI tool: Connect AWS to New Relic The newrelic-lambda integration command connects the AWS account containing your Lambdas to New Relic. If you've already installed one of our AWS integrations, your accounts should be linked to New Relic and you can skip this section. To manually establish this connection, follow the instructions for connecting AWS to Infrastructure monitoring. Configure our log-ingestion Lambda The newrelic-lambda integration command sets up a newrelic-log-ingestion Lambda. This Lambda takes the logs generated by your Lambda functions and pushes those logs to New Relic. If you're configuring this manually, you must configure our Lambda for the regions you want. The CLI, by default, establishes our Lambda in all regions. To manually configure our Lambda, go to the AWS Serverless Application Repository, which is where the newrelic-log-ingestion Lambda is stored. This repo is a collection of serverless applications published by developers, companies, and partners in the serverless community. It allows developers to share their Lambda functions code with customers, who can then find and deploy the corresponding application Lambda function. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. To manually configure our Lambda with the AWS Serverless Application Repository: From the AWS console, go to the Lambda section, select Create function, and select Serverless Application Repository. Search for newrelic and find the newrelic-log-ingestion Lambda. Follow the instructions in the Lambda's documentation to deploy it. A SAM template will build the Lambda. In the environment variable section in AWS console, set the LICENSE_KEY environment variable to your New Relic license key. Note: If you have multiple accounts or a master and sub-account hierarchy, make sure the license key you're using matches the same account connected to AWS. Optional: If you want to stream all your logs to New Relic, set the LOGGING_ENABLED environment variable to true. For more on this, see Stream all logs. Step 3. Enable Lambda instrumentation This step enables instrumentation of your Lambda function, which allows detailed monitoring and alerting functionality. Our instrumentation is designed to have minimal impact on your Lambda performance. If you're using Node.js or Python, we recommend the first two options. Option #1: Use Serverless Framework plugin (Node.js and Python) Requirements Available only for Node.js and Python. For other languages, see Manual instrumentation. Serverless Framework version 1.34.0 or higher. Features If you meet the requirements (above), you can use our Serverless Framework plugin, which allows you to add our AWS Lambda Layer to your functions without requiring a code change. Supports Node.js and Python runtimes No code change required to enable Lambda instrumentation Enables our APM agent functionality using a single layer Configures CloudWatch subscription filters automatically Gets the layer into your code base which is useful for redeploys Install To install our Serverless Framework plugin: Choose an install option: NPM: npm install --save-dev serverless-newrelic-lambda-layers yarn: yarn add --dev serverless-newrelic-lambda-layers Add the plugin to your serverless.yml: plugins: - serverless-newrelic-lambda-layers Get your account ID and put it in the serverless.yml: custom: newRelic: accountId: YOUR_ACCOUNT_ID Deploy it: sls deploy You can skip Step 4. Setting up CloudWatch Logs. This is automatically completed on deploy by our Serverless Framework plugin. For the next step, go to What's next? Option #2: Add Lambda Layer with our CLI (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework and don't intend to redeploy your function frequently, you can use the CLI to add our Lambda Layer: If you haven't already done so, install the CLI: pip install newrelic-lambda-cli List available functions: newrelic-lambda functions list Pass the option -f not-installed to see which functions have not yet been instrumented. Add the layer to your function: newrelic-lambda layers install --function FUNCTION_NAME --nr-account-id NEW_RELIC_ACCOUNT_ID Next, you will configure CloudWatch to send logs to New Relic. Option #3: Manually add our Lambda Layer (Node.js and Python) Available only for Node.js and Python. For other languages, see Manual instrumentation. If you don’t have Serverless Framework, you can manually add our Lambda Layer: Find the layer that matches your runtime and region. Copy the Amazon Resource Name (ARN) of the most recent version and add it in the AWS Lambda console for your function. Update your functions handler to point to the newly attached layer in the console for your function: Python: newrelic_lambda_wrapper.handler Node: newrelic-lambda-wrapper.handler Add these environment variables to your Lambda console: NEW_RELIC_ACCOUNT_ID: Your account ID NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler. If you have Node 8 and get a Lambda can't find file error message, expand this collapser: Node 8 \"can't find file\" error troubleshooting If you have Node 8 and receive a Lambda can't find the file newrelic-lambda-wrapper.js message, it's likely that the Node runtime isn't resolving NPM_PATH for the newrelic-lambda module in /opt/nodejs/node_modules. These steps should fix this problem: Create a newrelic-wrapper-helper.js script in your project's root. The script's contents should be module.exports = require('newrelic-lambda-wrapper');. (That is all that needs to be in that script.) Update the handler for your layer declaration to newrelic-lambda-wrapper.handler. Next, you will configure CloudWatch to send logs to New Relic. Option #4: Manually instrument Lambda code for Go, Java, .NET Core, Node.js, and Python If none of the previous options work for you, you can manually instrument your Lambda code. Choose your language: Go To instrument your Go-language Lambda: Download our Go agent package and place it in the same directory as your function. Install the agent: go get -u github.com/newrelic/go-agent. In your Lambda code, import our components, create an application, and update how you start your Lambda. See our GitHub repo for an example of an instrumented Lambda. Optional: Add custom events that will be associated with your Lambda invocation by using the RecordCustomEvent API. For example: func handler(ctx context.Context) { if txn := newrelic.FromContext(ctx); nil != txn { txn.Application().RecordCustomEvent(\"MyEvent\", map[string]interface{}{ \"zip\": \"zap\", }) } fmt.Println(\"hello world!\") } Build and zip your Lambda function and upload it to AWS. Zip and upload recommendations Here are suggestions for zipping and uploading the Lambda: Build the binary for execution on Linux. This produces a binary file called main. You can use: $ GOOS=linux go build -o main Zip the binary into a deployment package using: $ zip deployment.zip main Upload the zip file to AWS using either the AWS Lambda console or the AWS CLI. Name the handler main (to match the name given during the binary build). The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this is the account ID for the root/parent account. Optional: To configure logging, see Go agent logging. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Java Monitoring for AWS Lambda in Java doesn't use our APM Java agent. Instead, it uses these two OpenTracing dependencies: AWS Lambda OpenTracing Java SDK: OpenTracing instrumentation for AWS Lambda RequestHandler and RequestStreamHandler. Our AWS Lambda OpenTracing Tracer: An OpenTracing Tracer implementation designed to monitor AWS Lambda. It generates spans, error events, transaction events, error traces, and provides distributed tracing support. Supported OpenTracing Versions OpenTracing 0.31.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:1.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:1.0.0 OpenTracing 0.32.0, 0.33.0: Lambda Tracer: com.newrelic.opentracing:newrelic-java-lambda:2.1.1 Lambda SDK: com.newrelic.opentracing:java-aws-lambda:2.1.0 To instrument your Java Lambda: In your project’s build.gradle file, include our OpenTracing AWS Lambda Tracer and the AWS Lambda OpenTracing SDK dependencies: dependencies { compile(\"com.newrelic.opentracing:java-aws-lambda:2.1.0\") compile(\"com.newrelic.opentracing:newrelic-java-lambda:2.1.1\") compile(\"io.opentracing:opentracing-util:0.33.0\") } Implement the AWS Lambda RequestHandler interface as shown in the Java Lambda example and override the doHandleRequest method. In the doHandleRequest method, call the LambdaTracing.instrument(...) API to create a root span to trace the lambda function's execution. This is also where you will define your business logic for the lambda function. Register a LambdaTracer.INSTANCE as the OpenTracing Global tracer, as shown in the Java Lambda example. Create a ZIP deployment package and upload it to AWS Lambda. Or deploy it via other means. In the AWS Lambda console, set the handler. For the example Java Lambda, the handler would be com.handler.example.MyLambdaHandler::handleRequest. Because handleRequest is assumed, you could also use com.handler.example.MyLambdaHandler. The following AWS console environment variables are required if you want your Lambda function to be included in distributed tracing. This is recommended. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_PRIMARY_APPLICATION_ID. This is also your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this must be the account ID for the root/parent account. Optional: In the Lambda console, enable debug logging by adding this environment variable: NEW_RELIC_DEBUG is true. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, you'll configure CloudWatch to send those logs to New Relic. Please see the AWS Lambda distributed tracing example for a complete project that illustrates common use cases such as: Distributed tracing between Lambda functions Manual span creation (aka custom instrumentation) Tracing external calls Adding custom attributes (aka Tags) to spans .NET Core Our monitoring of .NET Core-based AWS Lambda functions doesn't use our standard .NET Core APM agent. Instead, it uses a NuGet package. To instrument your .NET Core Lambda: In your Lambda Functions project, install the NewRelic.OpenTracing.AmazonLambda.Tracer NuGet package. Note: NewRelic.OpenTracing.AmazonLambda.Tracer depends on version 1.2.0+ of the Amazon.Lambda.APIGatewayEvent NuGet package. If the environment already uses a lower version of Amazon.Lambda.APIGatewayEvent, the New Relic package may produce errors such as System.MissingMethodException. Import the NuGet package and OpenTracing utils: using OpenTracing.Util; using NewRelic.OpenTracing.AmazonLambda; Instrument your function, as shown in this example: public class Function { static Function() { // Register The NewRelic Lambda Tracer Instance GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public object FunctionWrapper(ILambdaContext context) { // Instantiate NewRelic TracingWrapper and pass your FunctionHandler as // an argument return new TracingRequestHandler().LambdaWrapper(FunctionHandler, context); } /// /// A simple function that takes a string and does a ToUpper /// /// /// /// public object FunctionHandler(ILambdaContext context) { ... } } The arguments passed to FunctionWrapper must match the signature of FunctionHandler. If your handler function returns a Task, the Lambda wrapper will block on the return task until it completes, so that it can measure the duration and capture exceptions, if any are present. In addition, you may also inherit from the APIGatewayProxyFunction. For an example, see below: Async handler function public override Task FunctionHandlerAsync(ILambdaContext lambdaContext) { // This call will block by calling task.Result Task task = new TracingRequestHandler().LambdaWrapper( ActualFunctionHandlerAsync, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(ILambdaContext lambdaContext) { // Function can make other async operations here ... } Inheriting from APIGatewayProxyFunction public class LambdaFunction : APIGatewayProxyFunction { static LambdaFunction() { // Register The NewRelic Lambda Tracer Instance OpenTracing.Util.GlobalTracer.Register(NewRelic.OpenTracing.AmazonLambda.LambdaTracer.Instance); } public override Task FunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { Task task = new TracingRequestHandler().LambdaWrapper(ActualFunctionHandlerAsync, request, lambdaContext); return task; } public Task ActualFunctionHandlerAsync(APIGatewayProxyRequest request, ILambdaContext lambdaContext) { return base.FunctionHandlerAsync(request, lambdaContext); } } Optional for SQS and SNS: Starting in version 1.0 of our .NET Lambda Tracer, distributed tracing support has been added for SQS and SNS. To enable distributed tracing for SQS or SNS you will need to complete the items in this step as well as setup the environment variables in the step that follows this one. Enabling distributed tracing support for SQS and SNS will disable automatic instrumentation for both of SQS and SNS and require the use of these wrappers to instrument them. Set the NEW_RELIC_USE_DT_WRAPPER environment variable to true. To instrument SQS and SNS calls you will need to use the provided wrappers. Using the SQS Wrapper The SQS wrapper supports wrapping the following methods: Amazon.SQS.AmazonSQSClient.SendMessageAsync(...) Amazon.SQS.AmazonSQSClient.SendMessageBatchAsync(...) Examples // SQS Client AmazonSQSClient client = new AmazonSQSClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // SendMessageRequest SendMessageRequest sendRequest = new SendMessageRequest(\"QUEUE_URI_STRING\", \"An SQS Message\"); Task responseOne = SQSWrapper.WrapRequest(client.SendMessageAsync, sendRequest); // String-based Task responseTwo = SQSWrapper.WrapRequest(client.SendMessageAsync, \"QUEUE_URI_STRING\", \"Another SQS Message\"); // SendMessageBatchRequest List batchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id1\", \"First SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id2\", \"Second SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id3\", \"Third SQS Message\")); SendMessageBatchRequest sendBatchRequest = new SendMessageBatchRequest(QUEUE_URI, batchEntries); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, sendBatchRequest); // SendMessageBatchRequestEntry List List moreBatchEntries = new List(); batchEntries.Add(new SendMessageBatchRequestEntry(\"id4\", \"Fourth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id5\", \"Fifth SQS Message\")); batchEntries.Add(new SendMessageBatchRequestEntry(\"id6\", \"Sixth SQS Message\")); Task response = SQSWrapper.WrapRequest(client.SendMessageBatchAsync, moreBatchEntries); Using the SNS Wrapper The SNS wrapper supports wrapping the following methods: Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.PublishAsync(...) Examples // SNS Client AmazonSimpleNotificationServiceClient client = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient(\"AWS_SECRET_ACCESS_KEY\", AWS_REGION); // PublishRequest - Phone Number PublishRequest phonePublishRequest = new PublishRequest(); phonePublishRequest.PhoneNumber = +1XXX5555100; phonePublishRequest.Message = \"An SNS Message for phones\"; Task phoneResponse = SNSWrapper.WrapRequest(client.PublishAsync, phonePublishRequest); // PublishRequest - ARN PublishRequest publishRequest = new PublishRequest(\"TOPIC_ARN\", \"An SNS Message\"); Task publishResponse = SNSWrapper.WrapRequest(client.PublishAsync, publishRequest); // String-based without subject Task ResponseOne = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Another SNS Message\"); // String-based with subject Task ResponseTwo = SNSWrapper.WrapRequest(client.PublishAsync, \"TOPIC_ARN\", \"Yet Another SNS Message\", \"A Subject\"); The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS Lambda console: NEW_RELIC_ACCOUNT_ID: The account ID the Lambda is reporting to. NEW_RELIC_TRUSTED_ACCOUNT_KEY: This is also the account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Ensure that the wrapper function (FunctionWrapper in above example) is set up as the function handler. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Node.js To instrument your Node.js Lambda: Download our Node.js agent package and place it in the same directory as your function, ensuring the agent is installed as a dependency in the node_modules directory. Use the Node Package Manager: npm install newrelic --save Install our AWS SDK module alongside the Node.js agent: npm install @newrelic/aws-sdk --save In your Lambda code, require the agent module and the AWS SDK at the top of the file, and wrap the handler function. For example: const newrelic = require('newrelic'); require('@newrelic/aws-sdk'); module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { // This is your handler function code console.log('Lambda executed'); callback(); }); Optional: You can also add custom events to your Lambda using the recordCustomEvent API. For example: module.exports.handler = newrelic.setLambdaHandler((event, context, callback) => { newrelic.recordCustomEvent(‘MyEventType’, {foo: ‘bar’}); console.log('Lambda executed'); callback(); }); Zip your Lambda function and the Node.js agent folder together. Requirements and recommendations: The New Relic files outside the New Relic agent folder don't need to be included. If your Lambda function file name is, for example, lambda_function.node, we recommend naming your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set these environment variables: NEW_RELIC_NO_CONFIG_FILE. Set to true if not using a configuration file. NEW_RELIC_APP_NAME: Your application name. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To run the agent in serverless mode outside of AWS in a local environment, set the environment variable NEW_RELIC_SERVERLESS_MODE_ENABLED to true. (When executing this in an AWS Lambda environment, the agent will automatically run in serverless mode. Do not use this variable if you're running in AWS.) Optional: To enable logging in serverless mode, set these environment variables: Set NEW_RELIC_LOG_ENABLED to true. Set NEW_RELIC_LOG to stdout for output to CloudWatch, or set to any writeable file location. The log level is set to info by default. See other log levels. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. Our wrapper gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next you'll configure CloudWatch to send those logs to New Relic. Python To instrument your Python Lambda: Download our Python agent package and place it in the same directory as your function. To do this, use pip: pip install -t . newrelic If you use Homebrew, you may get this error: DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both. For details, see the Homebrew GitHub post. In your Lambda code, import the Python agent module and decorate the handler function using the New Relic decorator. The New Relic package must be imported first in your code. Here's an example: import newrelic.agent newrelic.agent.initialize() @newrelic.agent.lambda_handler() def handler(event, context): ... Optional: You can also add custom events to your Lambda using the record_custom_event API. Here's an example: @newrelic.agent.lambda_handler() def handler(event, context): newrelic.agent.record_custom_event('CustomEvent', {'foo': 'bar'}) … Zip your lambda_function.py and newrelic/ folder together using these guidelines: The New Relic files outside the newrelic/ folder don't need to be included. If your Lambda function file name is, for example, lambda_function.py, name your zip file lambda_function.zip. Do not use a tarball. Your Lambda and its associated modules must all be in the zip file's root directory. This means that if you zip a folder that contains the files, it won't work. Upload the zipped file to your AWS Lambda account. In the AWS console, set this environment variable: NEW_RELIC_SERVERLESS_MODE_ENABLED. Set to true The following environment variables are not required for Lambda monitoring to function but they are required if you want your Lambda functions to be included in distributed traces. To enable distributed tracing, set these environment variables in the AWS console: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED. Set to true. NEW_RELIC_ACCOUNT_ID. Your account ID. NEW_RELIC_TRUSTED_ACCOUNT_KEY. This is also your account ID. If your account is a sub-account, this needs to be the account ID for the root/parent account. Optional: To configure logging, use the NEW_RELIC_LOG and NEW_RELIC_LOG_LEVEL environment variables in the AWS Console. Invoke the Lambda at least once. This creates a CloudWatch log group, which must be present for the next step to work. The New Relic decorator gathers data about the Lambda execution, generates a JSON message, and logs it to CloudWatch Logs. Next, configure CloudWatch to send those logs to New Relic. Step 4. Configure CloudWatch logs to stream to New Relic Lambda In this step, you'll link your Lambda function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda that was configured in Step 2. For Node.js and Python: This step isn't necessary if you used the Serverless Framework plugin option in Step 3. This step can be done using the CLI tool or using manual procedures. Use CLI tool Run this command for every Lambda function you want to monitor: newrelic-lambda subscriptions install --function FUNCTION_NAME_#1 Or to set subscription filters for all supported functions run this command:: newrelic-lambda subscriptions install --function all Notes on this command: You should only need one newrelic-log-ingestion Lambda per AWS account and region. You can subscribe as many functions to it as you like. To see more detail about the arguments, including a region-specifying argument, see our GitHub documentation. You may receive a CloudWatch validation error. This doesn't affect data reporting. If you see data reporting in New Relic, disregard that error message. If you have our Logs and want to send all your log data to us (not just Lambda logs), see Stream all logs. Manual procedures Here are the manual procedures performed by the CLI tool: Manual process: Stream CloudWatch logs to New Relic Lambda In Step 2, you set up a newrelic-log-ingestion Lambda function. After you've instrumented your Lambda function (Step 3), the newrelic-lambda subscriptions command links that function's CloudWatch Logs stream to the newrelic-log-ingestion Lambda. To do this manually: Open CloudWatch and select Logs in the left-hand menu, and then select the log group for the function you are monitoring. Select Actions and choose Stream to AWS Lambda. Under Lambda function, select the newrelic-log-ingestion function. Set the Log format to JSON. Set the Subscription filter pattern to ?REPORT ?NR_LAMBDA_MONITORING ?\"Task timed out\". Alternatively, if you are using the LOGGING_ENABLED environment variable stream all your logs to our Logs, leave this field blank. See notes and caveats about this procedure. Make sure the newrelic-log-ingestion Lambda function you select in the method above is in the same AWS region as your Lambda function. What's next? After you complete these steps, here's what you can do next: See data reporting in the Lambda monitoring UI. If you're having trouble finding your data, see Lambda enable troubleshooting. Use configuration settings to fine-tune your data. Our newrelic-log-ingestion function is not updated automatically. For best results and access to latest features, we recommend you occasionally update our Lambda monitoring. Optional: Stream all logs to New Relic If you have log management enabled and want to report all your logs to New Relic, follow these instructions: Go to our newrelic-log-ingestion Lambda and set the LOGGING_ENABLED environment variable to true. It isn't possible to edit existing filter patterns, so they must be removed and re-added: Set the Subscription filter pattern to \"\". Go to the Log group for each monitored Lambda, and remove the newrelic-log-ingestion subscription. Add the subscription filter back, leaving the Subscription filter pattern field blank. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 143.21573, + "_score": 134.20006, "_version": null, "_explanation": null, "sort": null, @@ -7235,7 +7250,7 @@ "external_id": "531f2f3985bf64bb0dc92a642445887095048882", "image": "", "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/", - "published_at": "2020-10-05T01:53:45Z", + "published_at": "2020-10-06T02:07:12Z", "updated_at": "2020-08-08T01:41:47Z", "document_type": "page", "popularity": 1, @@ -7243,7 +7258,7 @@ "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag⁠ (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 122.61062, + "_score": 120.21307, "_version": null, "_explanation": null, "sort": null, @@ -7279,7 +7294,7 @@ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161", "image": "", "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/", - "published_at": "2020-10-05T01:56:43Z", + "published_at": "2020-10-06T02:10:04Z", "updated_at": "2020-08-14T01:49:25Z", "document_type": "page", "popularity": 1, @@ -7287,7 +7302,7 @@ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │   └── my-nerdlet-launcher │   ├── icon.png │   └── nr1.json ├── nerdlets │   └── my-nerdlet-nerdlet │   ├── index.js │   ├── nr1.json │   └── styles.scss ├── node_modules │   ├── js-tokens │   ├── loose-envify │   ├── object-assign │   ├── prop-types │   ├── react │   ├── react-dom │   ├── react-is │   └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return

Hello, my-awesome-nerdpack Nerdlet!

; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.", "_index": "520d1d5d14cc8a32e600034b", "_type": "520d1d5d14cc8a32e600034c", - "_score": 121.5896, + "_score": 118.33199, "_version": null, "_explanation": null, "sort": null, @@ -7296,47 +7311,6 @@ "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create" }, "id": "5efa989e196a671300766404" - }, - { - "sections": [ - "Add tables to your New Relic One application", - "Before you begin", - "Clone and set up the example application", - "Work with table components", - "Next steps" - ], - "title": "Add tables to your New Relic One application", - "type": "developer", - "tags": [ - "table in app", - "Table component", - "TableHeaderc omponent", - "TableHeaderCell component", - "TableRow component", - "TableRowCell component" - ], - "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936", - "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png", - "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/", - "published_at": "2020-10-05T01:53:45Z", - "updated_at": "2020-09-17T01:48:42Z", - "document_type": "page", - "popularity": 1, - "info": "Add a table to your New Relic One app.", - "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). Application Size Company Team Commit ; { ({ item }) => ( {item.name} {item.value} {item.company} {item.team} {item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company} {item.team} {item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.", - "_index": "520d1d5d14cc8a32e600034b", - "_type": "520d1d5d14cc8a32e600034c", - "_score": 115.94193, - "_version": null, - "_explanation": null, - "sort": null, - "highlight": { - "title": "Add tables to your New Relic One application", - "sections": "Add tables to your New Relic One application", - "info": "Add a table to your New Relic One app.", - "body": " build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you" - }, - "id": "5efa989ee7b9d2ad567bab51" } ] } \ No newline at end of file From ecdc84a8d98c144ad9afded2dff24d52a37e2fbb Mon Sep 17 00:00:00 2001 From: Jemiah Sius Date: Thu, 8 Oct 2020 00:12:58 -0400 Subject: [PATCH 6/7] update form error message --- src/components/MarketoForm/MarketoForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/MarketoForm/MarketoForm.js b/src/components/MarketoForm/MarketoForm.js index da54a8318..d040bad60 100644 --- a/src/components/MarketoForm/MarketoForm.js +++ b/src/components/MarketoForm/MarketoForm.js @@ -47,7 +47,9 @@ const MarketoForm = ({
{state.matches('blocked') && ( - Unable to load the form. Perhaps you have an ad blocker enabled? + Unable to load the form. Perhaps you have an ad blocker enabled? If + you’re having issues registering, or any questions, email + deco@newrelic.com” )} {state.matches('error') && Unable to load the form.} From b91ca1fb56d7b86191ae258d856238367a74ee89 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 7 Oct 2020 21:35:44 -0700 Subject: [PATCH 7/7] chore: remove trailing quote --- src/components/MarketoForm/MarketoForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MarketoForm/MarketoForm.js b/src/components/MarketoForm/MarketoForm.js index d040bad60..0b144ba86 100644 --- a/src/components/MarketoForm/MarketoForm.js +++ b/src/components/MarketoForm/MarketoForm.js @@ -49,7 +49,7 @@ const MarketoForm = ({ Unable to load the form. Perhaps you have an ad blocker enabled? If you’re having issues registering, or any questions, email - deco@newrelic.com” + deco@newrelic.com )} {state.matches('error') && Unable to load the form.}